Apache->glassfish->jenkins/gitbucketのapacheの設定

warで落としてきたjenkinsとかをapache経由でglassfishで動かす。

a2enmod proxy
a2enmod proxy_http
a2enmod headers

して

ProxyPreserveHost On
ProxyPass         /jenkins  http://localhost:8080/jenkins nocanon
ProxyPassReverse  /jenkins  http://localhost:8080/jenkins
ProxyRequests     Off
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/jenkins*>
  Order deny,allow
  Allow from all
</Proxy>
ProxyPass /gitbucket http://localhost:8080/gitbucket
ProxyPassReverse /gitbucket https://localhost:8080/gitbucket

ProxyPreserveHost On
ないとloalhost:8080/jenkinsとかにリダイレクトされる。

glassfishJavaEEの参照実装なのでこれから使う機会も増えると思う。こういうノウハウは蓄積していきたい。

管理コンソールとかも充実しまくりなのでglassfishは使っていきたい。

h2o->apache->glassfish->jenkinsとかになって良い感じ