Confluence 5.8 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
Note: This page documents a configuration of Apache, rather than of Confluence itself. Atlassian will support Confluence with this configuration, but we cannot guarantee to help you debug problems with Apache. Please be aware that this material is provided for your information only, and that you use it at your own risk.
はじめに
Apache web サーバーは、高負荷環境のパフォーマンスを改善するため、アプリケーション サーバーのフロントでよく使用されます。mod_proxy は特定の URL へのリクエストを別の web サーバーにリダイレクトするため、通常、アプリケーション サーバーの追加の設定は不要です。
このページは、2つの Apache 仮想ホストでの JIRA アプリケーションの設定、異なるアプリケーション サーバーでの実行など、非常に一般的な設定のリクエストをドキュメント化しています。これは mod_proxy 設定の特殊な場合です。
JIRA アプリケーションと Confluence を同じアプリケーション サーバーで実行する場合、アプリケーション サーバーの仮想ホストを使用することができます。
Apache 設定
この設定を適切に動作させるため、アプリケーション パスはアプリケーション サーバーと web サーバーで同じにする必要があります。以下の JIRA と Confluence の両方の場合で、これは / になります。
JIRA 外部 URL | |
|---|---|
JIRA アプリケーション サーバー URL | |
Confluence 外部 URL | |
Confluence アプリケーション サーバー URL |
以下を Apache の httpd.conf に追加します。
# Put this after the other LoadModule directives
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
# Put this with your other VirtualHosts, or at the bottom of the file
NameVirtualHost *
<VirtualHost *>
ServerName confluence.example.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://confluence-app-server.internal.example.com:8090/
ProxyPassReverse / http://confluence-app-server.internal.example.com:8090/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
<VirtualHost *>
ServerName jira.example.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://jira-app-server.internal.example.com:8080/
ProxyPassReverse / http://jira-app-server.internal.example.com:8080/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
注意点:
- ProxyPass と ProxyPassReverse ディレクティブは、web サーバーからアプリケーション サーバーにトラフィックを送信します。
- アプリケーション パスはアプリケーション サーバーと web サーバーで同じになります(両方とも / になります)。
- 上記の設定は名前ベースの仮想ホスティングを使用するため、DNS サーバーが両方の名前(jira.example.com、confluence.example.com)で web サーバーを参照するように設定する必要があります。
詳細情報
mod_proxy を設定する別の方法については、「Apache で mod_proxy を使用する 」を参照してください。
Tomcat を使用する場合、mod_jk はAJP を介して Apache を接続する別の方法を提供しています。Tomcat の仮想ホストを使用する場合、上記の設定を1つのアプリケーション サーバーで使用することもできます。