How to Run Confluence on Two Different Ports
Description
We want to run Confluence on two different ports simultaneously. This article explains how to create such a setup and is applicable to any webapp running behind apache Tomcat.
Adding multiple ports can degrade performance. Test these changes in a testing environment before applying to production.
Resolution
- Open the <Confluence_Installation_Directory>/conf/server.xml file
Note the <connector> tag and copy this section
At the end of the existing connector tag, paste the copy from step two
Change the port value in this new connector section to the additional port to be used. It will be something like the below:
<Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"/> <Connector port="8453" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"/>
- Save the file and restart Confluence.
We will now be able to connect using either port 8090 OR 8453 (as per the above example)