Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket server is redirecting to localhost:7990 behind nginx reverse proxy

  • I have Bitbucket server 7.1.1
  • Running on CentOS 7
  • Running behind an nginx reverse proxy
  • Running on port 7990
  • With the baseUrl configured within the settings admin panel

I can access bitbucket through my the web interface by going to the reverse proxied address When I do, it asks for my login, and then upon successful login, I am redirected to http://localhost:7990.

Then (since I am an admin) I see a warning in the upper right corner that there is a "Base URL mismatch", but when I go to set the base URL, it is already set to

Finally, when I go to create a new repository and get its URL to clone it for the first time, I see http://localhost:7990/<....>/project.git in the URL instead of the base URL<...>/project.git. 

I would guess this all stems from the same issue, but even through searching all of the answers online, I cannot figure out a solution to this problem!

How do I stop it from referencing http://localhost:7990 even when the base URL is configured?

Also, I am not using SSL and do not plan to at this time.

For reference, this is what my reverse proxy nginx script looks like:

server {
    listen 80;

    location / {
        proxy_pass http://localhost:7990/;
        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;
        client_max_body_size 10M;
        proxy_connect_timeout 180s;
        proxy_send_timeout 180s;
        proxy_read_timeout 180s;

1 answer

1 accepted

1 vote
Answer accepted

Hi Michael,

You'll need to add 


to and restart Bitbucket Server.



Premier Support Engineer


Thank goodness! That was all it took and now it works.

For anyone else looking, my file was not in the same location as my bitbucket installation on CentOS 7. The installation is in the /opt/atlassian/bitbucket directory, whereas this properties file is in /var/atlassian/application-data/bitbucket (in the shared directory).

These are instructions I have been unable find online in all my google searches for "Install bitbucket behind nginx reverse proxy," with various combinations of including my operating system and bitbucket server version.

Can you point me to where I should have found these installation steps to correctly configure this installation behind the reverse proxy?

Hi Michael,

The title of this article is perhaps a bit misleading, because it applies regardless of whether you use SSL or not:



Premier Support Engineer


Like Michael_Plautz likes this

Thank you. I now recall even looking at this article, but I was unable to make the leap between using port 443/TCP for SSL and 80/TCP for standard HTTP in the properties file. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

121 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you