Set a context path for Atlassian applications

This document outlines the steps if you wish that your Atlassian application to be accessed on a context path, such as http://ourcompany.com/<contextpath>.

1. Stop the Atlassian applications

Click for stopping information...
JIRA applications

Use these commands from the JIRA installation directory:

  • bin/start-jira.sh
  • bin/stop-jira.sh

On Windows, use:

  • bin\start-jira.bat
  • bin\stop-jira.bat

See also JIRA application Startup and Shutdown Scripts.

Confluence

Use these commands from the Confluence installation directory:

  • bin/start-confluence.sh
  • bin/stop-confluence.sh

On Windows, use:

  • bin\start-confluence.bat
  • bin\stop-confluence.bat

See also Starting Confluence Automatically on System Startup.

Bamboo Server

Use these commands from the Bamboo installation directory:

  • bin/start-bamboo.sh
  • bin/stop-bamboo.sh

On Windows, use:

  • bin\start-bamboo.bat
  • bin\stop-bamboo.bat

See also Running Bamboo as a service.

Bitbucket Server

You should stop the service that is running Bitbucket. If you used the installer, the following should do it:

  • From a Linux environment
# service atlbitbucket status
# service atlbitbucket stop
# service atlbitbucket start
  • From a Windows environment
    Just stop the service that is running Bitbucket server.

Alternatively, you can use these commands from the Bitbucket installation directory to manually stop the process:

On Linux, use:

  • bin/start-bitbucket.sh
  • bin/stop-bitbucket.sh

On Windows, use:

  • bin\start-bitbucket.bat
  • bin\stop-bitbucket.bat

See also Starting and stopping Bitbucket Server.

Fisheye

Use these commands from the Fisheye installation directory:

  • bin/start.sh
  • bin/stop.sh

On Windows, use:

  • bin\start.bat
  • bin\stop.bat

See also Running Fisheye as a Windows service.

Crucible

Use these commands from the Crucible installation directory:

  • bin/start.sh
  • bin/stop.sh

On Windows, use:

  • bin\start.bat
  • bin\stop.bat

See also Running Crucible as a Windows service.

Crowd

Use these commands from the Crowd installation directory:

  • /start_crowd.sh
  • /stop_crowd.sh

On Windows, use:

  • \start-crowd.bat
  • \stop-crowd.bat

See also Installing Crowd as a Windows Service.

2. Set the context path

Fisheye and Crucible

If you're proxying Fisheye or Crucible, configure the web context path for Jetty from the admin area. See Configuring the Fisheye web server.

JIRA applications, Confluence, Bitbucket Server, Bamboo

If you're proxying any of these Atlassian server applications, configure the context path in the Tomcat server.xml file as follows.

Click for server.xml location info...

The location of your server.xml file depends on your application, operating system, and installation location. 

Common default installation locations for Atlassian applications are:

  • Linux: /opt/atlassian/<application-name>
  • Windows: C:\Program Files\Atlassian\<application-name>
  • Windows: C:\Atlassian\<application-name>

The default locations of server.xml files for Atlassian applications are:

Application server.xml location
JIRA applications <install-path>/conf/server.xml
Confluence <install-path>/conf/server.xml
Bamboo <install-path>/conf/server.xml
Bitbucket 5.0 and later

N/A, replaced by <Bitbucket home directory>/shared/bitbucket.properties

Please read through Migrate server.xml customizations to bitbucket.properties

Bitbucket Server 4.0 – 4.14

<Bitbucket home directory> /shared/server.xml

Stash 3.8 – 3.11

<Stash home directory>/shared/server.xml

Stash 3.7 and earlier <install-path>/conf/server.xml
Fisheye The Fisheye configuration file is config.xml, but see Configuring the Fisheye web server.
Crucible As for Fisheye.
Crowd

<install-path>/apache-tomcat/conf/server.xml

Note that crowd is predefined as the context path. Updating this requires several steps outlined by Removing the 'crowd' Context from the Application URL.

 

<install-path>  refers to where the application was installed on your system.


In the Tomcat server.xml configuration file for all applications except Crowd, locate the Context directive that looks like this:

<Context path="" docBase="${catalina.home}/atlassian-<atlassianapp>" reloadable="false" useHttpOnly="true">

Change the directive to add the new context path:

<Context path="/<contextpath>" docBase="${catalina.home}/atlassian-<atlassianapp>" reloadable="false" useHttpOnly="true">

Use your own value for <contextpath>. Typically, each application would use a different context path.

It is important that the path value has a leading forward slash (/) like path="/<contextpath>" rather than path="<contextpath>".

Use these instructions to Removing the 'crowd' Context from the Application URL.

Note: You can't use /resources as your context path for Confluence, as this is used by Confluence, and will cause problems later on. 

Last modified on Jul 31, 2018

Was this helpful?

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