Bitbucket Server logo displays incorrect URL
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Symptoms
The Bitbucket Server logo displays an incorrect URL while all other links are correct.
Cause
A. Your server.xml
is not properly configured (this issue usually occurs after upgrading Bitbucket Server version 4.x). After upgrading Bitbucket Server you need to manually reapply any previous customization in your previous server.xml
to your new server.xml.
B. Your proxy is not properly configured.
Resolution
A. Your server.xml
needs to be configured as described on the step "Update any custom configurations" of the Bitbucket Server upgrade guide document. Usually the parameters redirectPort , scheme , proxyName and proxyPort
are missing from your new server.xml
installation and a diff between the two server.xml
files (new against old installation) should show that. For specific instructions on how your server.xml
should be configured, please refer to the Proxy and secure Bitbucket which will contain your specific set up. Note that adding these parameters to server.xml
requires a restart on your instance before it takes effect.
B. Bitbucket Server uses the 'Host' HTTP header which is being sent via your proxy. From the discussion on this Answers post successfully updating the URL required this additional directive in the nginx configuration file (i.e. nginx.conf)
:
1
proxy_set_header Host $host;
For example, nginx.conf
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
server {
listen 443;
server_name mycompany.com;
ssl on;
ssl_certificate <path/to/your/certificate>;
ssl_certificate_key <path/to/your/certificate/key>;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Optional optimisation - please refer to http://nginx.org/en/docs/http/configuring_https_servers.html
# ssl_session_cache shared:SSL:10m;
location /bitbucket {
proxy_pass http://localhost:7990/bitbucket;
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_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
}
}
Was this helpful?