How to configure jira to work properly behing a proxy (nginx) with both HTTP and HTTPS ?

Jira works just fine behind nginx as far as you do not want to make it available on BOTH HTTPS and HTTP.

In nginx:

location / {
        proxy_pass; # and 8081 in the SSL version of the same config
        proxy_read_timeout      10800s;
        proxy_set_header        Host            $http_host;
        proxy_set_header        X-Real-IP       $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

In server.xml

<Connector port="8080"
scheme="http" proxyName="" proxyPort="80"

<Connector port="8081"
scheme="https" proxyName="" proxyPort="443"

The remaining problem is that Jira complains about not running from the correct address based on what you configure as a base_url, you can configure either or but not both so on one of them it will complain.

If I'm not wrong HTTP specification says that you could use // to allow the browser to choose between https or http, still the UI does not allow you to enter this.

If there any way to trick jira into working fine under both?

1 answer

1 accepted

2 votes

No. The base url has to be a single url because Jira uses it for publishing information. If you had more than one url, which one do you use on emails or gadgets?

The simple thing to do is redirect http to https automatically.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

132 views 0 3
Join discussion

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