2017-02-26 8 views
4

昨日私が文書化した古いものと同じように、ubuntu 16.04のインストールで新しいgitlab 8.17.0をインストールしてください。私はプロキシとしてencryptを可能にするapache2を実行しています。すべてがうまくいくかのように見えますが、いくつかのJSファイルはロードされません。私は、HTTPSドメイン/資産/ WebPACKの/ lib_dX.js 422 Unprocessable Entity、JS Files、gitlab 8.17、apache ssl

  • ドメイン/資産/ WebPACKを/ユーザー-X
  • ドメイン/資産/ WebPACKの/アプリケーション-XXX.js
    • で "422処理不能エンティティ" を取得します.jsファイル
    • ドメイン/資産/ WebPACKの/ lib_d3-X.js
    • ドメイン/資産/ WebPACKを/ユーザー-X.js

    /etc/gitlab/gitlab.rb

    external_url 'https://gitlab.example.com' 
    
    nginx['listen_address'] = 'localhost' 
    nginx['listen_port'] = 8080 
    nginx['listen_https'] = false 
    
    web_server['external_users'] = ['www-data'] 
    nginx['enable'] = false 
    

    <VirtualHost *:80> 
         ServerName gitlab.example.com 
         ServerAdmin [email protected] 
    
         ErrorLog /var/log/apache2/gitlab.example.com/error.log 
         CustomLog /var/log/apache2/gitlab.example.com/access.log combined 
    
         Redirect 301/https://gitlab.example.com/ 
    </VirtualHost> 
    
    <VirtualHost *:443> 
         ServerName gitlab.example.com 
         ServerAdmin [email protected] 
    
         ErrorLog /var/log/apache2/gitlab.example.com/error.log 
         CustomLog /var/log/apache2/gitlab.example.com/access.log combined 
    
         RequestHeader set X-Forwarded-Proto "https" 
         RequestHeader set X-Forwarded-Port "443" 
         ProxyPreserveHost On 
         ProxyPass/http://localhost:8080/ 
         ProxyPassReverse/http://localhost:8080/ 
    
         SSLEngine on 
         SSLCertificateFile /etc/letsencrypt/live/gitlab.example.com/cert.pem 
         SSLCertificateKeyFile /etc/letsencrypt/live/gitlab.example.com/privkey.pem 
         SSLCertificateChainFile /etc/letsencrypt/live/gitlab.example.com/chain.pem 
    
        <Proxy http://localhost:8080/> 
        Order deny,allow 
        Allow from all 
        </Proxy> 
    </VirtualHost> 
    

    /etc/apache2/sites-available/gitlab.example.com.conf誰もが問題を解決するためのアイデアを持っていますか?

    ありがとうございました!私はあなたに良い日曜日を祈っています。

    答えて

    1

    私は上記の静的ファイルを提供しても、nginxプロキシの後ろで同じ問題を抱えていました。 は/ opt/gitlab /組込み/サービス/ gitlab-レールで

    Started GET "/assets/webpack/application-0b895f7016d93748393a-v2.js" for 127.0.0.1 at 2017-03-05 11:14:21 +0100 
    Processing by ApplicationController#route_not_found as JS 
        Parameters: {"unmatched_route"=>"assets/webpack/application-0b895f7016d93748393a-v2"} 
    Security warning: an embedded <script> tag on another site requested protected JavaScript. 
    If you know what you're doing, go ahead and disable forgery protection on this action to 
    permit cross-origin JavaScript embedding. 
    Completed 422 Unprocessable Entity in 28ms (ActiveRecord: 1.8ms) 
    
    ActionController::InvalidCrossOriginRequest (Security warning: an embedded 
    <script> tag on another site requested protected JavaScript. If you know 
    what you're doing, go ahead and disable forgery protection on this action to 
    permit cross-origin JavaScript embedding.): 
        lib/gitlab/middleware/multipart.rb:93:in `call' 
        lib/gitlab/request_profiler/middleware.rb:14:in `call' 
        lib/gitlab/middleware/go.rb:16:in `call' 
    

    だから私は行った変更/:/var/log/gitlab/gitlab-rails/production.logファイルにエラーがありました設定/環境/ production.rb

    config.action_controller.allow_forgery_protection = false 
    
        # Disable Rails's static asset server (Apache or nginx will already do this) 
        config.serve_static_files = true 
    

    と再起動gitlab(gitlab-CTLの再起動)。今は動作しますが、私のサーバーのセキュリティは弱いと思います。

    +0

    お祝いにダウングレード。古いバージョンのgitlabを再インストールします。これが私の解決策でした。今はすべてうまくいきません。この問題もご覧ください:https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2021 – Phillip

    0

    これはまだ修正されていない8.17の問題です。

    ただ、8.16 sudo apt-get install gitlab-ce=8.16.6-ce.0

    関連する問題