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 http://127.0.0.1:8080; # 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="jira.example.com" proxyPort="80" /> <Connector port="8081" ... scheme="https" proxyName="jira.example.com" 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 http://jira.example.com or https://jira.example.com but not both so on one of them it will complain.
If I'm not wrong HTTP specification says that you could use //example.com 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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.