Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

There are various reasons why you may wish to change the context path for Stash. Two of those are:

Upgrade Note

Since the manual steps of this process modify the Stash distribution, you will need to repeat Steps 1-6 each time you upgrade Stash.

Changing the context path for Stash:

  1. 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.
  2. Stop Stash. This can be done using bin/stop-stash.bat on Windows or bin/stop-stash.sh on OSX or Linux.
  3. Edit conf/server.xml and find the element below:

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

    Update the path attribute 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.

     

  4. Start Stash. This can be done using bin/start-stash.bat on Windows or bin/start-stash.sh on 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.

  5. Once Stash has started, go to the administration area and click Server Settings (under 'Settings'). Add the new context path to your base URL:

    https://my-stash-hostname:7990/stash
  6. Click Save.

Stash + Apache

Note that if you are running Stash behind Apache:

  • you will need to make sure that the host or context path that Stash is exposed on is not also being used by another web application that is listening on a different port.
  • and if you have updated the Stash context path using the steps outlined above, you will need to update your Apache configuration, as described in Integrating Stash with Apache HTTP Server.