
昨日からホームサーバーに Gitlab をインストールしようとしていますが、今のところうまく動作していません :(
私は、次の Gitlab サイトから入手可能なパッケージを使用して、Ubuntu 14.04 にインストールしました。https://about.gitlab.com/downloads/#ubuntu1404
次に外部ドメインを使用するように設定しましたhttps://gitlab.example.com(セキュリティ上の理由で変更) SSL を使用したリバース プロキシを使用して Apache 経由でプロキシしたいと考えています。
今のところ、ログイン ページが表示され、ブラウズすることはできますが、デフォルトのユーザー名とパスワードを使用してログインしようとすると、リダイレクトの無限ループに陥ってしまい、その理由がわかりません。これまでに見つけたすべての解決策を試しましたが、どれもうまくいきませんでした。
いくつか変更を加えました/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)
皆さんの中に、なぜこのようなことが起きているのか分かる人はいませんか?
よろしくお願いいたします、ベニー