Forums

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

ERROR: Basis-URL is not like Browser-URL

Markus Gerdelmann October 10, 2019

I have installed BitBucket on Debian 10.1 Server with Apache2.

 

In the config-file of Apache2 is an redirection to the URL localhost:7990

 

<<<<<

ServerAdmin admin@bitbucket.XXXXX.eu
ServerName bitbucket.XXXXX.eu
ServerAlias www.bitbucket.XXXXX.eu
ErrorLog /error.log
CustomLog /access.log combined

ProxyRequests Off

<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://localhost:7990/
ProxyPassReverse / http://localhost:7990/

<<<<<

 

I have search the default-server.xml and the server.xml in the Install-Folder of BitBucket, but I can't find it.

 

What is the problem? Why is there an Alert like:

 

<<<<<

Base URL mismatch You are accessing Bitbucket from a URL that does not match the configured base URL.

<<<<<

 

What can I do to fix the problem?

2 answers

0 votes
Markus Gerdelmann October 11, 2019

Hello Alexis!

 

Thank you. Now ALERT in BitBucket is not there.

 

BUT:

In my Browser the URL is switching from:

 

http://bitbucket.XXXXX.eu 

 

to

 

http://bitbucket.XXXXX.eu:7990

 

But I don't want to see the Port in the URL. Why it shows me the Port now?

Alexis Robert
Community Champion
October 11, 2019

Since you've set your reverse proxy with the correct port number, you should not have to put it in the URL.

Did you also change the Bitbucket Base URL from http://bitbucket.XXXXX.eu:7990 to http://bitbucket.XXXXX.eu ? It's explained here how to do it.

 

Le met know if this works, 

 

--Alexis

Markus Gerdelmann October 11, 2019

When I change the Basic-URL in BitBucket - System-Menü to

http://bitbucket.XXXXX.eu

 

then it shows me the Alert again.

 

When I set the Basic-URL to

http://bitbucket.XXXXX.eu:7990

 

then the Alert is gone...

0 votes
Alexis Robert
Community Champion
October 11, 2019

Hi @Markus Gerdelmann , 

 

you're getting an error because you have not correctly configured Bitbucket bitbucket.properties file : you need to edit this file to configure the proxyName setting. This is explained in this documentation:

The usual server.xml configuration has been replaced by properties that need to be configured on <Bitbucket Home directory>/shared/bitbucket.properties. Similarly, you can't configure web.xml

 

Configure the connector in Tomcat to have the proper proxy configuration. The connector in $BITBUCKET_HOME/shared/bitbucket.properties should have server.proxy-name and server.proxy-port at a minimum, for example:

	server.port=7990
	server.secure=true
	server.scheme=https
	server.proxy-port=443
	server.redirect-port=443
	server.proxy-name=bitbucket.company.com

 

Let me know if you have any questions, 

 

--Alexis

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events