Gitlab: Login führt zu unendlicher Umleitungsschleife

Gitlab: Login führt zu unendlicher Umleitungsschleife

seit gestern versuche ich Gitlab auf meinem Heimserver zu installieren, aber bisher hatte ich kein Glück, es zum Laufen zu bekommen :(

Ich habe es auf Ubuntu 14.04 installiert, indem ich die verfügbaren Pakete von der Gitlab-Site unter folgender Adresse verwendet habe:https://about.gitlab.com/downloads/#ubuntu1404

Dann habe ich es so konfiguriert, dass die externe Domäne verwendet wirdhttps://gitlab.example.com(aus Sicherheitsgründen geändert) und ich möchte es über Apache mithilfe eines Reverse-Proxys mit SSL proxyen.

Bisher kann ich die Anmeldeseite sehen und mich umsehen, aber wenn ich versuche, mich mit dem Standardbenutzernamen und -kennwort anzumelden, lande ich in einer Endlosschleife von Weiterleitungen und kann den Grund dafür nicht finden. Ich habe bisher jede Lösung ausprobiert, die ich gefunden habe, aber keine davon funktioniert bei mir.

Ich habe einige Änderungen vorgenommen in /etc/gitlab/gitlab.rb:

external_url 'https://gitlab.example.com'
unicorn['port'] = 8890 # needed, since the port 8080 was already in use
nginx['listen_addresses'] = ['*']
nginx['listen_port'] = 8888
nginx['listen_https'] = false

Mein Apache 2.4 vHost ist folgendermaßen konfiguriert:

<VirtualHost *:80>
  ServerName gitlab.example.com

  ErrorLog /var/log/apache2/gitlab.example.com-error.log

  Redirect / https://gitlab.example.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName gitlab.example.com

  ErrorLog /var/log/apache2/gitlab.example.com-error.log

  RequestHeader set Host "gitlab.example.com"
  RequestHeader add X-Forwarded-Ssl on
  RequestHeader set X-Forwarded-For %{REMOTE_IP}e
  RequestHeader set X-Forwarded-Proto "https"

  ProxyPreserveHost On
  ProxyPass / http://localhost:8888/
  ProxyPassReverse / http://localhost:8888/

  SSLEngine on
  SSLCertificateKeyFile /etc/apache2/mycert/server.key
  SSLCertificateFile /etc/apache2/mycert/server.crt
</VirtualHost>

Und das Protokoll /var/log/gitlab/gitlab-rails/production.logsagt mir Folgendes:

Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 7ms (ActiveRecord: 2.0ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 7ms (ActiveRecord: 4.3ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 6ms (ActiveRecord: 1.8ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 6ms (ActiveRecord: 2.8ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 7ms (ActiveRecord: 2.0ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 5ms (ActiveRecord: 2.3ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 7ms (ActiveRecord: 2.0ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 6ms (ActiveRecord: 2.8ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 7ms (ActiveRecord: 1.9ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 6ms (ActiveRecord: 2.8ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 5ms (ActiveRecord: 0.9ms)
Started GET "/" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by RootController#index as HTML
Completed 401 Unauthorized in 3ms (ActiveRecord: 1.2ms)
Started GET "/users/sign_in" for xxx.xxx.xxx.xxx at 2015-09-24 22:32:40 +0200
Processing by SessionsController#new as HTML
Redirected to https://gitlab.example.com/
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 5ms (ActiveRecord: 1.1ms)

Vielleicht hat jemand von Euch eine Idee, warum das so ist?

Beste Grüße, Benni

verwandte Informationen