Running NGINX reverse proxy in front of Jira (localhost) Edited

 

I've setup Jira to run on my.lan.net:8080 and now would like to add Nginx as a reverse proxy. I've made the edits following the guide here: https://confluence.atlassian.com/jirakb/integrating-jira-with-nginx-426115340.html. It seems something is amiss however. The login page is missing all CSS or something.

jira.png

 

I can't quite figure out what I've goofed up. Anyone know where to look for clues? Are all four connector configurations required for this or am I supposed to only pick one? Not sure from the docs. My intention is to run Jira on the localhost interface
only and have Nginx handle the outside-world communication stack. Perhaps this is not possible?

my nginx config is this:

server {
listen 80;
server_name my.lan.net;
return 301 https://$server_name$request_uri;
access_log off;
}

server {

listen 443 ssl;
server_name my.lan.net;

ssl_certificate /etc/nginx/ssl/bundle.crt;
ssl_certificate_key /etc/nginx/ssl/my_lan_net.key;

location /jira {
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_pass http://127.0.0.1:8080/jira/;
client_max_body_size 10M;
}

}

my jira/conf/server.xml is here:
<Service name="Catalina">

<Connector port="8080"
maxThreads="150"
minSpareThreads="25"
connectionTimeout="20000"

enableLookups="false"
maxHttpHeaderSize="8192"
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"

proxyName="my.lan.net"
proxyPort="80"
scheme="http"
/>

<!-- Nginx Proxy Connector -->
<Connector port="8080" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" proxyName="my.lan.net" proxyPort="80"/>

<!-- OPTIONAL,Nginx Proxy Connector with https -->
<Connector port="8081" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" proxyName="my.lan.net" proxyPort="443" scheme="https" secure="true"/>

<!-- Standard HTTP Connector -->
<Connector port="8082" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>

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

 

1 answer

This widget could not be displayed.

In your server.xml you cannot have two connectors on the same port. Remove one of them.

Second, your nginx config forces users to use https. This is good, but your only needed connector is this:

<Connector port="8080"
maxThreads="150"
minSpareThreads="25"
connectionTimeout="20000"

enableLookups="false"
maxHttpHeaderSize="8192"
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"

proxyName="my.lan.net"
proxyPort="443"
scheme="https"
secure="true"
/>

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

77 views 1 0
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