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 Base URL

Greetings! Whenever I log into my Bitbucket instance behind an Apache reverse proxy for SSL, Bitbucket thinks I'm using the localhost:7990 URL, when I'm not (it says base URL does not match current URL). I'm using - Any help on this would be appreciated!
Currently I'm using an evaluation license, but I've sent in an open source request.

Some extra info:
SSL CA: Let's Encrypt - Wildcard SSL valid for *

Bitbucket Server Version: 5.13.1

I can attach my VirtualHost if needed.


1 answer

1 accepted

1 vote
Answer accepted
Alexis_Robert Community Leader Aug 26, 2018

Hello @Michael Husted


you should be able to simply update the Base URL in your BitBucket configuration as described here.


Let me know if this helps, 



Still gives the error. Let me try resetting my cache.

Yep, still says it. Could it be because the reverse proxy is accessing localhost, so it thinks I am too? The Bitbucket header image directs me to localhost as well. It gives me localhost when I make a branch as well. (the part where it says to push code/whatever has localhost:7990 there instead of

Alexis_Robert Community Leader Aug 26, 2018

ok so it might be because of your reverse proxy configuration, what does your vhost look like ?

You just need to change these 2 lines:


ProxyPass / http://localhost:7990/ 
ProxyPassReverse / http://localhost:7990/


to the actual bitbucket server IP: 


ProxyPass / http://10.0.0.X/ 
ProxyPassReverse / http://10.0.0.X/


wouldn't that create a redirect loop?

Alexis_Robert Community Leader Aug 26, 2018

sorry I edited the answer - it should be your bitbucket server IP

and this with nothing after the trailing /

Changed it to my server's public-facing IP, that somewhat resolved the issue. Is there anyway I could redirect my raw IP:port -> my domain?

Alexis_Robert Community Leader Aug 26, 2018

you mean like when you type it would redirect to ? I don't think that's possible unless you play with redirects, like this:


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^12\.34\.56\.789$
RewriteRule ^(.*)$$1 [L,R=301]

Wouldn't I need to have apache listen on that port? Or could I make a RegEx for it?

@Alexis_RobertThe primary issue I'm having is that it's showing the IP:Port when creating a new repository. Also the Bitbucket header has it too.

Hi Evan,

The URL used in those links is the URL configured as the Base URL.

Additionally, did you set the reverse proxy information in



Premier Support Engineer


The base URL is, that's odd. What would I need to add to the properties file? I was looking into that earlier but couldn't find anything.

Actually, it's always yelling at me that my Base URL is incorrect.



@Christian GlocknerI appreciate your help! @Alexis_Robert you too :^)

Hi Evan,


You'll need to add just a few lines to as described in step 1 here:



Premier Support Engineer


I needed to add

ProxyPreserveHost On

to my VirtualHost to fix it, and set my base url to non-HTTPS. It's working now, thanks!

Suggest an answer

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

Bitbucket Server 7.0 is here!

Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...

1,005 views 6 5
Read article

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