This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Running Tomcat on a Different Port

All Versions
Click for all versions
Confluence 2.9 Documentation

Index

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 edition

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">

Labels:

apache apache Delete
tomcat tomcat Delete
port port Delete
connector connector Delete
standalone standalone Delete
bindexception bindexception Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Jun 07, 2006

    John Kakritz says:

    You will also want to follow these instructions:

    You will also want to follow these instructions: http://confluence.atlassian.com/display/DOC/Configuring+the+Server+Base+URL and change the base URL.

  2. Aug 10, 2007

    Ruth Inman says:

    IIS has a bug where it ALWAYS grabs port 80 for all addresses on a machine, even...

    IIS has a bug where it ALWAYS grabs port 80 for all addresses on a machine, even if those addresses are not assigned to IIS. This means you can't run Tomcat or Apache on port 80 (think http://wiki) without fixing IIS first.

    http://support.microsoft.com/kb/813368/EN

Add Comment