Gitlab: Вход в систему приводит к бесконечному циклу перенаправления

Gitlab: Вход в систему приводит к бесконечному циклу перенаправления

Со вчерашнего дня я пытаюсь установить Gitlab на свой домашний сервер, но пока мне не удалось его запустить :(

Я установил его на Ubuntu 14.04, используя доступные пакеты с сайта Gitlab по адресу:https://about.gitlab.com/downloads/#ubuntu1404

Затем я настроил его на использование внешнего домена.https://gitlab.example.com(изменено по соображениям безопасности) и я хочу проксировать его через Apache, используя обратный прокси с SSL.

Пока что я вижу страницу входа и могу просматривать ее, но когда я пытаюсь войти, используя имя пользователя и пароль по умолчанию, я попадаю в бесконечный цикл перенаправлений, и я не могу найти причину. Я перепробовал все решения, которые нашел до сих пор, но ни одно из них не работает для меня.

Я внес некоторые изменения в /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

Мой Apache 2.4 vHost настроен следующим образом:

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

А журнал /var/log/gitlab/gitlab-rails/production.logмне говорит следующее:

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)

Может быть, у кого-то из вас есть идея, почему это происходит?

С уважением, Бенни

Связанный контент