There are various reasons why you may wish to change the context path for Stash. Two of those are:
- You are running Stash behind a proxy.
- You have another Atlassian application, or Java web application, available at the same hostname and context path as Stash, and are experiencing login problems (see Login and session conflicts with multiple Atlassian applications).
Changing the context path for Stash:
- Navigate to the directory where you are running Stash from. This is the install directory that you extracted the Stash distribution to, not your Stash home directory.
- Stop Stash. This can be done using
bin/stop-stash.baton Windows orbin/stop-stash.shon OSX or Linux. Edit
conf/server.xmland find the element below:<Context path="" docBase="${catalina.home}/atlassian-stash" reloadable="false" useHttpOnly="true"/>Update the
pathattribute to reflect the context path that you want Stash to be accessible at, e.g. "/stash":<Context path="/stash" docBase="${catalina.home}/atlassian-stash" reloadable="false" useHttpOnly="true"/>Then save the file.
- Start Stash. This can be done using
bin/start-stash.baton Windows orbin/start-stash.shon OSX or Linux.
Stash should now be available at the same host as before under the new context path. For example a server that was at http://localhost:7990 will now be reachable at http://localhost:7990/stash. Once Stash has started, go to the administration area and click Server Settings (under 'Settings'). Append the new context path to your base URL:
https://my-stash-hostname:7990/stash
Click Save.