I modified the base URL of my Stash instance to http://myserver.mydomain.com/stash, and have nginx redirecting. I also modified the Context path in server.xml to point to "/stash".
I can log in just fine and use Stash using http://myserver.mydomain.com/stash, but I noticed two issues: clicking on the Stash logo in the upper-left corner of the page tries to link to "http://localhost:7990". The other issue is linking to Jira and Confluence; they also believe Stash is at http://localhost:7990. Anyone else encounter this problem? Thanks!
Hi Jim,
Have you configured the server.xml to also include the proxy name/port?This is for apache, but the server.xml changes need to happy for nginx as well:
https://confluence.atlassian.com/display/STASH/Integrating+Stash+with+Apache+HTTP+Server
Cheers,
Charles
Yes, Charles - I did. I can log into Stash without problems. I also double-checked the base URL set for Stash, and that is correct as well. It seems the internal Stash application doesn't use the base URL setting, since I've also found that creating new project/repositories also has the same problem.
In those instances Stash uses the 'Host' HTTP header which is being sent via your Nginx. Do you have some configuration on the proxy side that would result in that header being sent incorrectly?
If you get stuck, would it be possible for you to attach your nginx and server.xml files? Or sanitized snippets so we can take a looK?
The snippet of my nginx config file:
location ^~ /jira {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;</em<>>
}
location ^~ /confluence {
location ^~ /stash {
Confirmed that adding:
proxy_set_header Host $host;
Fixed my issue with Stash + nginx.
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
proxyName="stash......
proxyPort="80" />
Issue summarized here: https://confluence.atlassian.com/display/STASHKB/Stash+logo+displays+localhost
Hi guys,
I have almost similiar issue Jim was facing but It's with IIS reverse proxy.I have bitbucket server 5.2 and changed the URL from https://myserver.mydomain.com to https://myserver.abc.mydomain.com.It's working normally but when I am trying to create a new branch from the Jira cloud page, it redirected to old URL.
Checked:
Thanks
It resolved itself, might be it was using the cached and took four-five days to update but not sure where it stored.
It looks like you're new here. Sign in or register to get started.