Nginx Reverse proxy config for HTTPS

Jason Hihn June 9, 2015

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
Jason Hihn June 15, 2015

 

 

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
0 votes
David Di Blasio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2015

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!

0 votes
Jason Hihn June 11, 2015

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
David Di Blasio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2015

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!

0 votes
Jason Hihn June 9, 2015

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
David Di Blasio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2015

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!

Suggest an answer

Log in or Sign up to answer