Confluence 2.7 Temp Archive : Using Apache with virtual hosts and mod_proxy
This page last changed on May 23, 2006 by david.soul@atlassian.com.
IntroductionThe Apache web server is often used in front of an application server to improve performance in high-load environments. Mod_proxy simply redirects requests for certain URLs to another web server, so it typically requires no additional configuration on the application server. This page documents a very common configuration request: configuring JIRA and Confluence on two Apache virtual hosts, running on different application servers. This is just a special case of mod_proxy configuration. You can use virtual hosts in your application server if you want to run JIRA and Confluence on the same application server. There is a sample configuration for Tomcat you can use after configuring Apache. Apache configurationFor this configuration to work properly, the application paths must be the same on both the application servers and the web server. For both JIRA and Confluence below, this is /.
Add the following to your 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:8080/ ProxyPassReverse / http://confluence-app-server.internal.example.com:8080/ <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> Points to note:
More informationFor different ways to configure mod_proxy, see Using Apache with mod_proxy. If you use Tomcat, mod_jk provides a different way of connecting Apache via AJP. You can also use the above configuration with just one application server if you use Tomcat's virtual hosts. |
![]() |
Document generated by Confluence on Dec 20, 2007 19:02 |