Skip to content

Instantly share code, notes, and snippets.

@edmondscommerce
Last active May 4, 2016 11:33
Show Gist options
  • Save edmondscommerce/41953b953e983db9cf8abc45f76648ec to your computer and use it in GitHub Desktop.
Save edmondscommerce/41953b953e983db9cf8abc45f76648ec to your computer and use it in GitHub Desktop.
Jira Nginx SSL Configuration
# /etc/nginx/conf.d/domain.com.conf
location /jira {
if ($scheme = 'http') {
rewrite ^ https://$http_host$request_uri? permanent;
}
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;
client_max_body_size 10M;
add_header X-Frame-Options SAMEORIGIN;
proxy_ignore_client_abort on;
proxy_pass http://127.0.0.1:8080/jira;
}
# /opt/atlassian/jira/conf/server.xml
<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="domain.com" proxyPort="443" scheme="https" secure="false"
/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context docBase="${catalina.home}/atlassian-jira" path="/jira" reloadable="false" useHttpOnly="true">
@edmondscommerce
Copy link
Author

Here is how to get Nginx to handle SSL termination for Jira

The two partial XML files are snippets of the file /opt/atlassian/jira/conf/server.xml

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