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>
.
For Confluence, please refer to the Configuring the Server Base URL product documentation.
1. Stop the Atlassian applications
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 |
Confluence | Use these commands from the Confluence installation directory:
On Windows, use:
See also Starting Confluence Automatically on System Startup. |
Bamboo Server | Use these commands from the Bamboo installation directory:
On Windows, use:
See also Running Bamboo as a service. |
Bitbucket Server | From a Linux environment:
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: bin/start-bitbucket.sh bin/stop-bitbucket.sh bin\start-bitbucket.bat bin\stop-bitbucket.bat |
Fisheye | Use these commands from the Fisheye installation directory:
On Windows, use:
See also Running Fisheye as a Windows service. |
Crucible | Use these commands from the Crucible installation directory:
On Windows, use:
See also Running Crucible as a Windows service. |
Crowd | Use these commands from the Crowd installation directory:
On Windows, use:
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, 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.
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 Please read through Migrate server.xml customizations to bitbucket.properties |
Bitbucket Server 4.0 – 4.14 |
|
Stash 3.8 – 3.11 |
|
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 |
Note that |
<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.