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

Gitbucket Base URL behind mod_proxy SSL

Florian Sturm Oct 14, 2016

Hello, I am running a latest Bitbucket server on an ubuntu server behind an apache with mod_proxy and an SSL certificate. I configured the connector of tomcat, that it works. Unfortunaly I get this message at the top of the frontend: Sie greifen auf Bitbucket von einer URL zu, die nicht mit der konfigurierten Basis-URL übereinstimmt. Sie haben die Möglichkeit das zu ändern .

 

In the backend there is the right base url defined. 

 

Can anyone help me please?

 

Thank you very much

 

1 answer

0 votes
Michael Heemskerk Atlassian Team Oct 14, 2016

Since you're terminating the SSL connection at the Apache server, Tomcat will receive the requests over HTTP. This HTTP vs HTTPS difference is most likely the cause of the base-url warning.

Make sure you have configured the secure, scheme, proxyName and proxyPort attributes on the Connector element in your server.xml as described in https://confluence.atlassian.com/display/BitbucketServer/Securing+Bitbucket+Server+with+Apache+using+SSL

 

Florian Sturm Oct 14, 2016

That are my Connectors:

 

<Connector port="7990" protocol="HTTP/1.1"

                   connectionTimeout="20000"

                   useBodyEncodingForURI="true"

                   redirectPort="8443"

                   compression="on"

                   scheme="http"

                   proxyName="git.floriansturm-webdesign.de"

                   proxyPort="80"

                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />


<Connector port="8443"

                protocol="org.apache.coyote.http11.Http11NioProtocol"

                maxThreads="150"

                SSLEnabled="true"

                scheme="https"

                secure="true"

                clientAuth="false"

                sslProtocol="TLS"

                proxyName="git.floriansturm-webdesign.de"

 

                proxyPort="443" />



And this is my virtualhost:

VirtualHost *:443>

        ServerName git.floriansturm-webdesign.de

        SSLCertificateFile /etc/myssl/floriansturm-webdesign.de.crt

        SSLCertificateKeyFile /etc/myssl/privkey.pem

        ProxyPass / http://localhost:7990/

        ProxyPassReverse / http://localhost:7990/

 

</VirtualHost>

 

Is that right?

Michael Heemskerk Atlassian Team Oct 14, 2016

I think you're missing the secure="true" attribute and on the 7990 Connector. You also need to set the scheme attribute to https (instead of http)

Florian Sturm Oct 14, 2016

anything else is correct? Im right, that I need these two connectors?

Florian Sturm Oct 14, 2016

I changed it, but the message still appears:

 

<Connector port="7990" protocol="HTTP/1.1"

                   connectionTimeout="20000"

                   useBodyEncodingForURI="true"

                   redirectPort="8443"

                   compression="on"

                   scheme="https"

                   secure="true"

                   proxyName="git.floriansturm-webdesign.de"

                   proxyPort="80"

                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,$

 

  <Connector port="8443"

                protocol="org.apache.coyote.http11.Http11NioProtocol"

                maxThreads="150"

                SSLEnabled="true"

                scheme="https"

                secure="true"

                clientAuth="false"

                sslProtocol="TLS"

                proxyName="git.floriansturm-webdesign.de"

                proxyPort="443" />

Michael Heemskerk Atlassian Team Oct 14, 2016

did you restart Bitbucket after updating server.xml?

Florian Sturm Oct 14, 2016

Yes, of course sad

 

Tino Schulze Nov 06, 2016

Hi Florian,

ich habe das selbe Problem. Konntest du es inzwischen lösen?

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,653 views 1 18
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