2016-12-08 5 views
0

私は正常にUbuntu 14.04にhttps://about.gitlab.com/downloads/#ubuntu1404を使ってGitlabをインストールしましたが、リダイレクトしてWeb(https://my.example.com/gitlab)でアクセスするのには苦労しています。Gitlab on Apache2 SSL

私は/etc/gitlab/gitlab.rbに変更した:

external_url 'https://my.example.com/gitlab'

nginxのは、[ '有効']偽

を=と、私はコメントを解除した場合sudo gitlab-ctl reconfigure

で再構成します:

WEB_SERVER [ 'external_users'] = [ 'WWWのデータ']

私が手:

レシピは は/ opt/gitlab /組込み/料理/キャッシュ/料理本でコンパイルエラー/ gitlab-EE /レシピ/デフォルト

NoMethodError -------------未定義のメソッド ` - 」nilのために:NilClass

クックブックトレース: --------------- /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:21:in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in
from_file '
/opt/gitlab --------------- : `from_file」

該当するファイルの内容/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:18:in ------- /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:

14:# 権限と15:#制限を管理する特定の言語のライセンスを参照してくださいライセンスの下で。 16:#17: 18:Gitlab [:node] =ノード19:20: File.exists?( '/ etc/gitlab/gitlab.rb')21 >>
Gitlab.from_file( '/ etc/gitlab/gitlab.rb ')22:端部23:24: node.consume_attributes(Gitlab.generate_config(ノード[' FQDN ']))25:

Iは/etc/apache2/sites-available/に種々gitlab.confを追加しようとしているもののhttps://my.example.com/gitlabはGitlabのログインページにリダイレクトされず、ホームページで実行されるRedmineサービスから「ページが見つかりません」というメッセージが表示されます。現在default-ssl.confDocumentRoot /var/wwwを使用し、Gitlab DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/publicを使用しています。 Apache2はSSLを使用するように設定されています。

UPDATE 1

私が作ったシンボリックリンク:

sudo ln -s /opt/gitlab/embedded/service/gitlab-rails/public /var/www/gitlab 

は、だから今は、デフォルト-ssl.confの中で設定することができます。

Alias /gitlab "/var/www/gitlab/deploy.html" 

がうまく機能している間

​​

は、Gitlabのホームページに転送しません。 Gitlabのホームページディレクトリとは何ですか? index.htmlファイルはどこですか?私はそれはバンドラーのように見える

を開始することができませんでしたhttps://my.example.com/gitlab/

Webアプリケーションを入力した後にエラーが出る

RackBaseURI /gitlab 
RailsBaseURI /gitlab 
<Directory /var/www/gitlab> 
    Allow from all 
    Options -MultiViews 
</Directory> 

私が追加した場合

UPDATE 2

ことができませんでした宝石を見つける。このアプリケーションに必要なすべての宝石をインストールしていない可能性があります。あなたの宝石をインストールするには、実行してください:それが機能しなかった場合は

をバンドル

をインストールし、その後、問題はおそらく、それがになっていますとは異なる環境下で実行されている>アプリケーションによって引き起こされます。 >次のことを確認してください:

Is this app supposed to be run as the www-data user? 
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use. 

--------次のように例外がある:------- はソースのいずれかに熊手-10.5.0を見つけることができませんでした(バンドラー:: GemNotFound)

/var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in block in materialize' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in map! ' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in materialize' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in specs ' /var/lib/gems/1.9.1/gems/bundler- 1.12.5/libに/バンドラ/ definition.rb:185:specs_for' /var/lib/gems/1.9.1/gems/bundler-1.12.5/lib/bundler/definition.rb:174:in requested_specs'

例外では上記のRubyを更新した後に解決しました。

UPDATE 3

は今、私はhttps://my.example.com/gitlabを入力するときGitlab最初のページを取得するためにGitlabとのApache2を構成する方法

Alias /gitlab "/var/www/gitlab" 
AllowEncodedSlashes NoDecode 

<Directory /var/www/gitlab> 
     Options Indexes FollowSymLinks MultiViews 
     PassengerAppRoot "/var/www/gitlab" 
     RailsBaseURI /var/www/gitlab 
     AllowOverride None 
     Order allow,deny 
     allow from all 
</Directory> 

enter image description here

を取得しますか?

答えて

0

私はそう、私は9099. 修正Gitlab構成sudo nano /etc/gitlab/gitlab.rbにユニコーンポートを変更した8080に取り組んで他のサービスを持っていた:

を:追加でApacheの設定 sudo nano /etc/apache2/apache2.confを修正 sudo gitlab-ctl reconfigure

external_url 'https://subdomain.example.com/gitlab' 

web_server['username'] = 'apache' #'gitlab-www' 
web_server['group'] = 'apache' #'gitlab-www' 

nginx['enable'] = false 

unicorn['listen'] = '127.0.0.1' 
unicorn['port'] = 9099 

・再構成Gitlab

ProxyPass   /gitlab http://127.0.0.1:9099/gitlab 
ProxyPassReverse /gitlab http://127.0.0.1:9099/gitlab 
RequestHeader add X-Forwarded-Proto https 

リロード済み:

sudo service apache2 reload 
+0

関連:http://serverfault.com/questions/822716/gitlab-https-uri-for-repository-cloning-does-not-work-ssl-host-could-not-beve – Justas

2

Apache設定がポート8080(ユニコーン)のGitLabサーバーにプロキシされていないようです。 https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apacheにはApacheの設定ファイルの例があります。

GitLab OmnibusでApacheを使用する手順については、http://ryansechrest.com/2015/08/use-apache-instead-of-built-in-nginx-in-gitlab-ce/で説明しています。 1年以上経っているので、Apacheの設定は少し古いかもしれません。ガイドを使用しますが、上記のgitlab-recipesリンクのApache構成を使用するとうまくいくはずです。

+0

ここで、ソース(Bundler :: GemNotFound)のいずれかでrake-10.5.0が見つかりませんでした。 – Justas

+0

このエラーが発生したときに実行しているコマンドは何ですか? Apacheの設定以外に何を変更しましたか? Apacheの設定を変更しても、GitLabアプリケーションが突然これらのエラーをスローすることはありません。 –

+0

私はこの問題を解決しました。ブラウザにGitlab URLを入力してしまったのですが、Rubyのバージョンが正しくなく、権限が不足していたためです。これで/ opt/gitlab/embedded/service/gitlab-rails/publicフォルダに転送され、Gitlabホームページの代わりにファイルを含む "Index of/gitlab"が表示されます。 – Justas