Nginx Reverse proxy config for HTTPS

I read the page for how to do a reverse proxy with nginx, but I can't get it to work with https. I followed the instructions on the page, and I think I modified them accordingly, but it bombed when trying to create the database.

 

To be clear here is what I want:

nginx reverse proxy, listenting only https (any http traffic is redirected to https),

forwards https://server/jira -> http://localhost:8080/  (JIRA instance, talking http to the proxy)

 

The jira-nginx-reverse-proxy page doesn't cover this scenario, it expects http-only. 

The disconnect as I understand it comes from JIRA sending http links to a server that redirects it to https. It would be best if it just immediately moved it to https.

 

Thank you

 

PS. I can't believe that you would condone the submission of bug information in the clear in 2015. 

6 answers

0 votes

Hi Jason,
Can you share with us your server.xml and your nginx configuration so we can get a better idea of how it's configured?

Cheers!

I re installed everything because it failed, I re-did the setup, same issue:

An internal error occurred and we are unable to complete JIRA setup

Your browser could not communicate with JIRA.

You can try to restart JIRA setup or contact Atlassian Support.

That error occurred after the db was created, but during the plugin setup.

So I only made one change in server.xml :

 <Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">

In nginx.conf I have (non-relevant settings removed, i had to add \ before curly brackets):

http \{

server \{

  listen 80;

  rewrite ^ https://$server_name$request_uri permanent;

} #http server

server \{

listen 443 ssl;

location /jira \{

   proxy_pass http://127.0.0.1:8080/jira;

} #https server

} #http

 

 

0 votes

Hi Jason, 

Do you see any errors in the logging after the start up? If you open a ticket with Support we can take a deeper look into this if you like. 

 

Cheers!

Where should I look for the log file? /var/atlassian/... or /opt/atlassian/... Which file? I'm kinda rusty when it comes to java servlets.

 

0 votes

I don't have a linux box handy right now, however, I'm pretty sure the path to the tomcat logs is /var/opt/atlassian/jira/logs/catalina.out 

 

Cheers!

 

 

2015-06-09 21:40:26,778 AsynchronousJiraSetup ERROR anonymous 1296x13x1 h7h7ph 69.255.212.148,127.0.0.1 /secure/SetupFinishing!triggerSetup.jspa [atlassian.jira.setup.InstantSetupStrategy] Cannot setup product license, http status code: 302
org.apache.http.client.HttpResponseException: Problem authenticating user during product bundle license installation

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

461 views 7 5
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