Confluence 2.7 Temp Archive : Guide to using Apache Tomcat's Virtual Hosts
This page last changed on Nov 26, 2006 by mryall.
IntroductionSometimes it is necessary to have Tomcat serve different applications on the same context path, but different host names. Most commonly, this is when trying to use a simple mod_proxy configuration with Apache. Tomcat configurationTomcat allows name-based virtual hosting, where the hostname of the request determines which application processes it. The following configuration shows how two virtual hosts can be configured for Jira and Confluence on the same Tomcat instance:
Below is a minimal configuration of Tomcat's server.xml which configures separate hosts for JIRA and Confluence on the URLs above. <Server port="8005" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="8080" /> <Engine name="Catalina" defaultHost="confluence-app-server.internal.example.com"> <Host name="confluence-app-server.internal.example.com" appBase="webapps"> <Context path="" docBase="/opt/webapps/confluence-2.2/confluence"/> <Logger className="org.apache.catalina.logger.FileLogger"/> </Host> <Host name="jira-app-server.internal.example.com" appBase="webapps"> <Context path="" docBase="/opt/webapps/jira-3.6.1/jira.war"/> <Logger className="org.apache.catalina.logger.FileLogger"/> </Host> </Engine> </Service> </Server> Points to note:
More informationAfter doing this, you can configure Apache virtual hosts to map subdomains like jira.example.com and confluence.example.com to your application. |
![]() |
Document generated by Confluence on Dec 20, 2007 19:02 |