2017-04-18 23 views
1

gitlabをサーバで動作させるのに問題があります。
environnmentは次のとおりです。
のUbuntu 16.04.1 LTS
のApache 2.4gitlabとapache接続が拒否されました

私は、オムニバススクリプト経由でgitlabをインストールし、それはApacheで動作させるためにgitlab.rbを編集し、専用のバーチャルホストをした、と少し苦労SSL証明書は、それが働いているが、私は解決することができないエラーで立ち往生しています。

私はhttps://gitlab.mydomain.com/users/sign_inに行く私が持っている素敵な503 エラーログは言う:

<VirtualHost *:443> 
    ServerName gitlab.mydomain.com 
    ServerSignature Off 
    SSLEngine on 
    SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem 
    SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem 

    ProxyPreserveHost On 

    # Ensure that encoded slashes are not decoded but left in their encoded state. 
    # http://doc.gitlab.com/ce/api/projects.html#get-single-project 
    AllowEncodedSlashes NoDecode 

    <Location /> 
    # New authorization commands for apache 2.4 and up 
    # http://httpd.apache.org/docs/2.4/upgrading.html#access 
    Require all granted 

    #Allow forwarding to gitlab-workhorse 
    ProxyPassReverse https://127.0.0.1:8181 
    ProxyPassReverse https://gitlab.mydomain.com/ 
    </Location> 

    # Apache equivalent of nginx try files 
    # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files 
    # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab 
    RewriteEngine on 

    #Forward all requests to gitlab-workhorse 
    RewriteRule .* https://127.0.0.1:8181%{REQUEST_URI} [P,QSA] 

    # needed for downloading attachments 
    DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public 

    #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up. 
    ErrorDocument 404 /404.html 
    ErrorDocument 422 /422.html 
    ErrorDocument 500 /500.html 
    ErrorDocument 503 /deploy.html 

    # It is assumed that the log directory is in /var/log/httpd. 
    # For Debian distributions you might want to change this to 
    # /var/log/apache2. 
    LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded 
    ErrorLog ${APACHE_LOG_DIR}/gitlab_error.log 
    CustomLog ${APACHE_LOG_DIR}/gitlab_forwarded.log common_forwarded 
    CustomLog ${APACHE_LOG_DIR}/gitlab_access.log combined env=!dontlog 
    CustomLog ${APACHE_LOG_DIR}/gitlab.log combined 
</VirtualHost> 

私が間違って何をしました:

ここ
[Tue Apr 18 16:58:56.556702 2017] [proxy:error] [pid 31966] (111)Connection refused: AH00957: HTTPS: attempt to connect to 127.0.0.1:8181 (*) failed 
[Tue Apr 18 16:58:56.556722 2017] [proxy_http:error] [pid 31966] [client 93.182.244.38:60339] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: https://gitlab.mydomain.com/users/sign_in 

が使用バーチャルホストですか?

ありがとうございました。

答えて

0

gitlab-workhorsedoesn't support SSL connections

主力は全くのRailsを介さずに、いくつかの要求を処理することができます。たとえば を、JavaScriptファイルとCSSファイルがまっすぐ ディスクから提供しています。

主力はレールによって送信された応答を変更することができます:あなたはRailsので send_fileを使用する場合、たとえば、その後gitlab-主力は ディスク上のファイルを開き、クライアントへのレスポンスボディとして、その内容を送信します。

Workhorseは、Railsの許可を求めた後に要求を引き継ぐことができます。 例:git cloneを処理しています。

Workhorseは要求をRailsに渡す前に変更することができます。例: Git LFSアップロードを処理する場合Workhorseは最初に のRailsから許可を求めてから、要求本体を一時ファイルに格納し、 に一時ファイルパスを含む変更要求をRailsに送信します。

Workhorseは、Rails用の長寿命WebSocket接続を管理できます。 例:環境のために端末websocketを処理する。

WorkhorseはPostgresには接続せず、Railsと(オプションで)Redisのみに接続します。

Workhorseに到達するすべてのリクエストが、最初にNGINXやApacheなどのアップストリームプロキシ を通過すると仮定します。

WorkhorseはHTTPS接続を受け入れません。

Workhorseは、アイドル状態のクライアント接続をクリーンアップしません。

RailsへのすべてのリクエストがWorkhorseを通過すると仮定します。

関連する問題