Confluence Docs 3.0 : Running Tomcat on a Different Port This page last changed on Jul 24, 2009 by ggaskell. By default Confluence's Tomcat instance listens on port 8080 for connections, and port 8005 for the command to shut down. If you see errors like:
    java.net.BindException: Address already in use:8080
in your logs, then you need to change the port number Confluence listens on (or you may be trying to start Confluence twice). ### Confluence WAR/EAR distribution Modify Tomcat conf/server.xml, change the ports used on the Server tag and HTTP Connector tag. If you don't know what this means, see the example in the Standalone configuration below. ### Confluence Standalone 2.2 and newer Edit conf/server.xml in your Confluence application directory, and change the ports on the Server tag and the Connector tag to unused ports on your system. The following example shows the relevant section of server.xml where they are changed to 8100 (Server) and 8180 (HTTP Connector). In this configuration you would access Confluence on the URL: http://localhost:8180/confluence.
    <Server port="8100" shutdown="SHUTDOWN" debug="0">
        <Service name="Tomcat-Standalone">
            <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8180" minProcessors="5"
                       maxProcessors="75"
                       enableLookups="true" redirectPort="8444" acceptCount="10" debug="0" connectionTimeout="20000"
                       useURIValidationHack="false" URIEncoding="UTF-8"/>
### Confluence prior to 2.2 You can change the port number by editing the file `<confluence install directory>/conf/server.xml`. Find the line:
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" minProcessors="5" maxProcessors="75"
and change 8080 to the port you want to use. If you are running two Tomcat instances, you'll also need to change the shutdown port in the line:
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
### Specifying the IP address to listen on For versions 2.2 and later, edit `conf/server.xml` as described above, but add an `address` parameter. The tomcat documentation is a useful reference here. To extend the example above, you can configure tomcat to listen only on the localhost interface with this configuration:
    <Server port="8100" shutdown="SHUTDOWN" debug="0">
        <Service name="Tomcat-Standalone">
            <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8180" minProcessors="5"
                       maxProcessors="75"
                       address="127.0.0.1"
                       enableLookups="true" redirectPort="8444" acceptCount="10" debug="0" connectionTimeout="20000"
                       useURIValidationHack="false" URIEncoding="UTF-8"/>
Why would you want to restrict it to access via localhost? If you're running Confluence behind a proxy server on the same host, this will make sure that users can't bypass the proxy and hit the application server directly.
| If your machine also runs IIS, you might encounter a problem where IIS binds to the same port (for example, port 80) for all IP addresses on the machine. This means that you will not be able to run Confluence on another web or application server through that port until you address this IIS issue first. For more information, refer to this Microsoft Knowledge Base article.

Document generated by Confluence on Nov 05, 2009 23:34