Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
access_log off;
return 301 https://$server_name$request_uri;
# /etc/nginx/conf.d/jira.conf
server {
listen 443 default ssl;
access_log off;
ssl on;
ssl_certificate /etc/nginx/certs/;
ssl_certificate_key /etc/nginx/certs/;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# server.xml config file from $JIRA/conf/
# add/modify this line from <Service name="Catalina"> directive
<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" scheme="https" proxyName="" proxyPort="443"/>
Copy link

beattidp commented Nov 15, 2017

Also possibly useful, e.g. before 'location / {'

              # Set maximum body size to JIRA's maximum attachment size (10M by default)
               client_max_body_size 10M;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment