Gitlab: El inicio de sesión conduce a un bucle de redireccionamiento infinito

Gitlab: El inicio de sesión conduce a un bucle de redireccionamiento infinito

Desde ayer estoy intentando instalar Gitlab en mi servidor doméstico, pero hasta ahora no he tenido suerte de ejecutarlo :(

Lo instalé en Ubuntu 14.04 usando los paquetes disponibles en el sitio de Gitlab en:https://about.gitlab.com/downloads/#ubuntu1404

Luego lo configuré para usar el dominio externo.https://gitlab.example.com(cambiado por razones de seguridad) y quiero enviarlo por proxy a través de Apache usando un proxy inverso con SSL.

Hasta ahora puedo ver la página de inicio de sesión y navegar, pero cuando intento iniciar sesión con el nombre de usuario y la contraseña predeterminados termino en un bucle infinito de redireccionamientos y no puedo encontrar el motivo. Probé todas las soluciones que encontré hasta ahora, pero ninguna funciona para mí.

Hice algunos cambios en /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

Mi vHost Apache 2.4 está configurado así:

<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>

Y el registro en /var/log/gitlab/gitlab-rails/production.logme dice esto:

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)

¿Quizás alguno de ustedes tenga una idea de por qué sucede esto?

Apuestas saludos, Benni

información relacionada