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

nginx redirect to bitbucket

Rauno Pihlajamäki Jun 10, 2016

This question is in reference to Atlassian Documentation: Securing Bitbucket Server behind nginx using SSL

We have JIRA & confluence behind nginx, and we access them like https://jira.domain.dom

Your instruction gives way how to access like this:

Is it a big job to modify tomcat etc. so that the URL would "equal"

If there's already instructions for that, the links would be nice smile


2 answers

1 accepted

0 votes
Answer accepted
Brian P Aug 22, 2016

That is actually how I deploy these applications. Here is the nginx config:


server {

        listen 443;

        ssl on;

        ssl_certificate ssl/yourcertificate.crt;

        ssl_certificate_key ssl/yourcertiticatekey.key;


        add_header X-Frame-Options ALLOW;  

        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_redirect off;

              proxy_connect_timeout 300;



server {

        listen 80;


        rewrite ^$request_uri? permanent;



In the server.xml file, update the connector for port 7990 with these options:








So the entire connector stanza looks like this:


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











Dominck Eger Sep 11, 2016

I tried this config and can't seem to get it to stop appending the 7990 at the end. Do you have this issue ?

Brian P Sep 12, 2016

I do not have that issue. Check the Base URL in the Server Settings page of the admin. If you previously had a port there (:7990), you'll need to remove it from the Base URL field and click "Save" at the bottom of the page.

0 votes
Rauno Pihlajamäki Aug 29, 2016

Thank you!


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 :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,312 views 1 22
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