Skip to content

Instantly share code, notes, and snippets.

@deanet
Forked from alertor/jira-behing-nginx-ssl
Last active August 29, 2015 14:21

Revisions

  1. @alertor alertor revised this gist Feb 18, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jira-behing-nginx-ssl
    Original file line number Diff line number Diff line change
    @@ -29,5 +29,5 @@ server {
    # 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="jira.catalystww.com" proxyPort="443"/>
    <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="jira.example.com" proxyPort="443"/>

  2. @alertor alertor renamed this gist Feb 18, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @alertor alertor created this gist Feb 18, 2013.
    33 changes: 33 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    # force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
    server {
    listen 80;
    server_name jira.example.com;
    access_log off;
    return 301 https://$server_name$request_uri;
    }

    # /etc/nginx/conf.d/jira.conf
    server {
    listen 443 default ssl;

    server_name jira.example.com;

    access_log off;
    ssl on;
    ssl_certificate /etc/nginx/certs/example.com.crt;
    ssl_certificate_key /etc/nginx/certs/example.com.key;

    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;
    proxy_pass http://127.0.0.1:8080/;
    }
    }

    # 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="jira.catalystww.com" proxyPort="443"/>