2017-05-27 29 views
0

ソフトウェア工場のリバースプロキシを設定しようとしています。すべてのアトラシアンスイートをリバースプロキシの下に置くことができましたが、JenkinsとSonarでそうするように苦労しました。ここApacheリバースプロキシtomcat(Jenkins、Sonar)を設定する正しい方法は何ですか

は、Apacheの設定です:

<VirtualHost *:443> 
      SSLCertificateFile /etc/apache2/ssl/atoe.crt 
      SSLCertificateKeyFile /etc/apache2/ssl/atoe.key 
      SSLCertificateChainFile /etc/apache2/ssl/bundle.crt 

      ProxyRequests Off 
      ProxyPreserveHost On 
      ProxyVia Off 

      <Proxy *> 
        Order deny,allow 
        Require all granted 
      </Proxy> 
      <Proxy http://localhost:9010/jenkins*> 
       Order deny,allow 
       Allow from all 
      </Proxy> 

      ProxyPass /confluence http://localhost:8090/confluence 
      ProxyPassReverse /confluence http://localhost:8090/confluence 

      ProxyPass /bitbucket http://localhost:7990/bitbucket 
      ProxyPassReverse /bitbucket http://localhost:7990/bitbucket 

      ProxyPass/http://localhost:8095/ 
      ProxyPassReverse/http://localhost:8095/ 

      ProxyPass /sonarqube http://localhost:9000/sonarqube 
      ProxyPassReverse /sonarqube http://localhost:9000/sonarqube 
</VirtualHost> 

Sonarqubeとジェンキンス両方は、Tomcat 7.0.69の下で実行されています。 sonar.propertiesと/ etc/default/jenkinsのコンテキストを変更し、上記のように正しいコンテキストを設定しました。プロキシ経由でこれらのツールに接続しようとするとエラー404が発生しました。

apache2のログには何も記載されていません。

何か不足していますか?あなたの助け

答えて

0

ため

おかげまあ、はProxyPassの順序が重要であると思われます。 "/"を定義する場合は、最後に定義する必要があります。それ以外の場合は、それ以降は何も考慮されません。我々の場合には

、私たちが持っていた:

 ProxyPass /confluence http://localhost:8090/confluence 
     ProxyPassReverse /confluence http://localhost:8090/confluence 

     ProxyPass /bitbucket http://localhost:7990/bitbucket 
     ProxyPassReverse /bitbucket http://localhost:7990/bitbucket 

     ProxyPass /sonarqube http://localhost:9000/sonarqube 
     ProxyPassReverse /sonarqube http://localhost:9000/sonarqube 

     ProxyPass/http://localhost:8095/ 
     ProxyPassReverse/http://localhost:8095/ 

 ProxyPass /confluence http://localhost:8090/confluence 
     ProxyPassReverse /confluence http://localhost:8090/confluence 

     ProxyPass /bitbucket http://localhost:7990/bitbucket 
     ProxyPassReverse /bitbucket http://localhost:7990/bitbucket 

     ProxyPass/http://localhost:8095/ 
     ProxyPassReverse/http://localhost:8095/ 

     ProxyPass /sonarqube http://localhost:9000/sonarqube 
     ProxyPassReverse /sonarqube http://localhost:9000/sonarqube 

はそれを動作させるために、我々は最後の二つを反転しなければなりませんでした

関連する問題