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 having non-https links behind an https proxy

Hello everyone,

 

I have just installed Bitbucket Server on an host to try, and configured it behind an nginx reverse proxy as per official documentation. Everything is working fine except a couple of things: the logo on top left and the git clone url have http instead of https as scheme. I have found this answer, https://jira.atlassian.com/browse/BSERV-2535 , but I have already these directives in the configuration. Specifically, conf/.default-server.xml has this connector configuration:

 

<Connector port="7990" protocol="HTTP/1.1"
  connectionTimeout="20000"
  useBodyEncodingForURI="true"
  redirectPort="8443"
  compression="on"
  compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
  secure="true"
  scheme="https"
  proxyName="git.mydomain.com"
  proxyPort="443"
/>

 

and the relevant nginx configuration is:

 

location / {
  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-Forwarded-Proto $scheme;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $host;
  proxy_redirect off;
  proxy_pass http://localhost:7990;
}

 

What could be wrong?

 

Thanks,

Andrea

4 answers

0 votes

Have you configured your base-url as https:// in Administration > Server Settings?

 

I could not answer before 24 hours because I am a new member. Anyway, yes, the scheme is configured as https:// .

Any other place I could look at?

I strugged with this myself, took me far too long to realise that 

/opt/atlassian/bitbucket/4.5.2/conf/.default-server.xml

gets overrided by:

/var/atlassian/application-data/bitbucket/shared/server.xml

and therefore you need to add 

scheme="https"
proxyName="your.proxy.domain"
proxyPort="443"

to the Connector in shared/server.xml and it all works fine!

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 Mar 14, 2019 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...

956 views 1 16
Read article

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