Forums

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

Secure BitBucket behind NGinx Reverse Proxy

Stefan Hüffer November 21, 2018

Hello everyone, I need to implement HTTPS encryption. First I tried to put my public certificate to java keystore with no success.

After that I followed the documentation about Reverse proxy with Nginx:

https://confluence.atlassian.com/bitbucketserver/securing-bitbucket-server-behind-nginx-using-ssl-776640112.html

My Nginx runs exactly with that configuration, I also changed the BitBucket Base URL according the docs.

When I do a test on https://mybitbb.lan/bitbucket

I am getting a Bitbucket index page with no css styles and an error:

Oops, you've found a dead link

Use the links at the top to get back.

    Git repository management for enterprise teams powered by BitBucket
 

my connector in server.xml for bitbucket looks like:

 <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" />
Nginx log says:

[error] 13493#0: *4 open() "/usr/share/nginx/html/s/221417179e8d94e8b810d1d596c59720-CDN/-555792808/1616799/1/3eb2356711248017b8de78656016fd36/_/download/contextbatch/css/_super/batch.css" failed (2: No such file or directory)

I am assuming that the https server block fails back to a default root which is

usr/share/nginx/html

So i double checked the atlassian docs in the nginx context for any ROOT directive but it's not set.

What can I do? PLEASE HELP

1 answer

0 votes
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 21, 2018

Hi @Stefan Hüffer,

Please confirm that you're only seeing these issues when accessing through Nginx.

Also, did you update bitbucket.properties with SSL information?

There is some examples at this link

Bitbucket Server secured with SSL-terminating connector

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events