Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

bitbucket and nginx reverse proxy

jagauthier November 18, 2020

Greetings,

 I've followed many of the instructions here, but my BB reverse proxy doesn't seem to work correctly.  All of my other (similar) hosts work fine, but BB won't redirect correctly.

 

server {
server_name bitbucket.domain.here;
proxy_read_timeout 600s;
location / {
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://bitbucket:7990;
proxy_set_header X-Real-IP $remote_addr;
port_in_redirect off;
proxy_redirect off;
}
}

 

In many cases it immediately reverts to http://bitbucket:7990

In some other cases it seemingly works, but clicking in "Bitbucket" logo in the upper left points to "http://bitbucket:7990"

 

Any help would be appreciated.

 

1 answer

1 accepted

0 votes
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2020

Hi,

Configuring a reverse proxy also requires some changes on the Bitbucket Server side, including a change of the Base URL in the server settings - did you adjust that accordingly?

What's more, you'll also need to tell Bitbucket Server about the fact that there is a reverse proxy - see https://confluence.atlassian.com/bitbucketserver/securing-bitbucket-server-behind-nginx-using-ssl-776640112.html (under Step 1) for the required configuration to be added.

Cheers,
Christian

Premier Support Engineer

Atlassian

jagauthier November 19, 2020

Thank you!  I was missing a few steps. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events