You are accessing Bitbucket from a URL that does not match the configured base URL. You may want to change it.

I see the error message described in the subject, and shown here, with a configuration which is Bitbucket behind a reverse proxy.

Selection_018.png

 

Please note this article does not resolve my question.

https://confluence.atlassian.com/bitbucketserverkb/you-are-accessing-bitbucket-from-a-url-that-does-not-match-the-configured-base-url-833941720.html

My configuration is as described for #2, a similar configuration works without errors for my JIRA and Confluence instances.

The only thing I would note with regards to my installation is the file $BITBUCKET_HOME/shared/server.xml does not exist for my default intallation - instead I seem to have $BITBUCKET_HOME/4.8.3/conf/.default-server.xml

Thanks!

Richard

6 answers

1 accepted

I had the same problem and discovered what was wrong after some hours ...

BITBUCKET_HOME is the data directory (with "plugins", "caches", ...) not the installation directory (with "webapps", "work", ...)

The default value of BITBUCKET_HOME on linux seems to be "/var/atlassian/application-data/bitbucket".

Hi,

They seem to recommend this in server.xml:

redirectPort="443"
     compression="on"
     compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
     secure="true"
     scheme="https"
     proxyName="bitbucket.company.com" 
     proxyPort="443" />

however, when using a mod-proxy every other tomcat/Atlassian application recommends to turn http compression off. Not sure if the manual on this topic is actually correct, you might want to try

compression="off"

The experts are arguing over it here: http://stackoverflow.com/questions/2767211/can-you-use-gzip-over-ssl-and-connection-keep-alive-headers

 

That did not fix the problem, but thanks for your suggestion.

-Richard

I am having the exact same issue. I was able to resolve this issue in confluence and jira, but I have spent a couple hours trying different configurations in Apache and bitbucket and nothing seems to work, i tried service-restarting even rebooting, nothing.

I click on the bitbucket logo and it is still taking me to http://localhost:7990  even though I configured bitbucket to default to https://bitbucket.domain.com

I am running Ubuntu 16, mysql5.6, bitbucket 4.6.5

My server file is here too (Strangely because it doesn't match the docs):

 $BITBUCKET_HOME/4.8.3/conf/.default-server.xml

Have you had any luck, Richard? 

0 vote
Adam Ahmed Atlassian Team Aug 15, 2016

I'm probably not knowledgeable enough to answer your question, but I just wanted to point out you didn't actually ask one. smile It would be good to explicitly define the problem you're having that that document didn't solve so others have enough context to help you out.

Also if you need more hands-on help and you don't find an answer here or in our docs, don't hesitate to open a support ticket at support.atlassian.com

Cheers,

Adam

Ah good point. I fixed that. Thanks.

Are you, perchance, using nginx as the reverse proxy?

If so, have a look at https://confluence.atlassian.com/bitbucketserver/securing-bitbucket-server-behind-nginx-using-ssl-776640112.html - if not, take note of the following stanzas anyway:

proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;

Adding those two to the others that I had already solved it for me

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,327 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you