How to change context path for Crowd
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
For various reasons, when utilizing the Crowd distribution, you may need to use a context path that aligns with your business requirements instead of using the default '/crowd
' context path: http://localhost:8095/crowd
.
This KB outlines the steps on how to change the context path for Crowd.
Environment
Crowd
Solution
The below steps can be followed to change the context path in Crowd.
In the below example '
/crowdtest
' context path is updated in place of /crowd.
In
<crowd_install>/build.properties
set thecrowd.url
variable to the following:# Crowd context root crowd.url=http://localhost:8095/crowdtest
- Run
<crowd_install>/build.sh
(UNIX) or<crowd_install>\build.bat
(Windows). Change your
<crowd_install>/apache-tomcat/conf/server.xml
file to include the following element in the Host section configuration:See the '
path=“/crowdtest”
' part.<Engine defaultHost=“localhost” name=“Catalina”> <Host appBase=“webapps” autoDeploy=“true” name=“localhost” unpackWARs=“true”> <Context debug=“0” docBase=“../../crowd-webapp” path=“/crowdtest”> <Manager pathname=“”/> </Context> <Valve className=“org.apache.catalina.valves.ErrorReportValve” showReport=“true” showServerInfo=“false”/> </Host> </Engine>
- Perform a backup of the
crowd.xml
file in<crowd_install>/apache-tomcat/conf/Catalina/localhost
to another directory. - Start Crowd and try accessing on http://localhost:8095/crowdtest
- After confirming it works like this, you can access it through the domain name configured and set the base URL accordingly.