Configuring the Server Base URL

The Server Base URL is the URL via which users access Confluence. The base URL must be set to the same URL by which browsers will be viewing your Confluence site.

Confluence will automatically detect the base URL during setup, but you may need to set it manually if your site's URL changes or if you set up Confluence from a different URL to the one that will be used to access it publicly.

You need to have System Administrator permissions in order to perform this function.

To change the Server Base URL:

  1. Go to Administration  > General Configuration.
  2. Select Edit.
  3. Enter the new URL in the Server Base URL field.
  4. Save your changes.

Example

If Confluence is installed to run in a non-root context path (that is, it has a context path), then the server base URL should include this context path. For example, if Confluence is running at:

http://www.foobar.com/confluence

then the server base URL should be:

http://www.foobar.com/confluence


Notes

  • Using different URLs. If you configure a different base URL or if visitors use some other URL to access Confluence, it is possible that you may encounter errors while viewing some pages.
  • Changing the context path. If you change the context path of your base URL, you also need to make these changes:
    1. Stop Confluence.
    2. Go to the Confluence installation directory and edit <installation-directory>\conf\server.xml.
    3. Change the value of the path attribute in the Context element to reflect the context path. For example, if Confluence is running at http://www.foobar.com/confluence, then your path attribute should look like this:

      <context path="/confluence" docBase="../confluence" debug="0" reloadable'"false" useHttpOnly="true">

      In this example we've used /confluence as the context path. Note that you can't use /resources as your context path, as this is used by Confluence, and will cause problems later on.  

    4. Save the file.

    5. Go to the Confluence home directory and edit <confluence-home>/confluence.cfg.xml 
    6. Change confluence.webapp.context.path to reflect the new context path. For example:

      <property name="confluence.webapp.context.path">/confluence</property>
    7. Restart Confluence and check you can access it at http://www.foobar.com/confluence.  

      You may also want to clear the Confluence plugins cache before restarting. 

  • Proxies. If you are running behind a proxy, ensure that the proxy name matches the base URL.  For example: proxyName="foobar.com" proxyPort="443" scheme="https". This will make sure we are passing the information correctly.  For more information on proxing Atlassian applications, see Proxying Atlassian Server applications
  • This information needs to be added in the Connector element at {CONFLUENCE_INSTALLATION}\conf\server.xml.
Last modified on Jul 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.