Skip to content

Instantly share code, notes, and snippets.

@mikhailov
Last active October 7, 2018 10:15

Revisions

  1. mikhailov revised this gist Jan 27, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions server.xml
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,8 @@

    <Connector port="8080"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    scheme="https"
    proxyName="localhost"
    proxyPort="8000"
    socket.txBufSize="64000"
    socket.rxBufSize="64000"
  2. mikhailov revised this gist Jan 27, 2014. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions server.xml
    Original file line number Diff line number Diff line change
    @@ -27,9 +27,8 @@
    <Manager pathname=""/>
    </Context>
    </Host>

    ....

    </Engine>

    </Service>
    </Server>
  3. mikhailov revised this gist Jan 27, 2014. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion server.xml
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,17 @@
    useBodyEncodingForURI="true"
    />

    ...
    <Engine name="Catalina" defaultHost="localhost">
    <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
    <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
    factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
    <Manager pathname=""/>
    </Context>
    </Host>

    ....


    </Service>
    </Server>
  4. mikhailov revised this gist Jan 23, 2014. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion nginx.conf
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,18 @@ http {
    }
    server {
    listen 8000;
    listen 8000 ssl spdy;
    spdy_headers_comp 3;
    ssl_certificate /usr/local/Cellar/nginx/1.5.8/server.crt;
    ssl_certificate_key /usr/local/Cellar/nginx/1.5.8/server.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers RC4:HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    error_page 497 https://$host:8000$request_uri;
    add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
    location /jira {
    proxy_pass http://jira_upstream/jira;
  5. mikhailov revised this gist Jan 23, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions server.xml
    Original file line number Diff line number Diff line change
    @@ -3,19 +3,19 @@

    <Connector port="8080"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    tcpNoDelay="1"
    proxyPort="8000"
    socket.txBufSize="64000"
    socket.rxBufSize="64000"

    maxThreads="50"
    minSpareThreads="10"
    maxThreads="25"
    minSpareThreads="5"
    enableLookups="false"
    maxHttpHeaderSize="8192"
    acceptCount="100"
    disableUploadTimeout="true"

    connectionTimeout="60000"
    maxKeepAliveRequests="25"
    useBodyEncodingForURI="true"
    />

  6. mikhailov revised this gist Jan 22, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion server.xml
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@
    acceptCount="100"
    disableUploadTimeout="true"

    connectionTimeout="20000"
    connectionTimeout="60000"
    useBodyEncodingForURI="true"
    />

  7. mikhailov revised this gist Jan 22, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,7 @@ http {
    location /jira {
    proxy_pass http://jira_upstream/jira;
    proxy_redirect off;
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
  8. mikhailov revised this gist Jan 22, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ http {
    upstream jira_upstream {
    server 127.0.0.1:8080 fail_timeout=30s;
    server 127.0.0.1:8080 fail_timeout=120s;
    keepalive 8;
    }
    @@ -40,7 +40,7 @@ http {
    proxy_read_timeout 180;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_set_header Connection "";
    }
    }
    }
  9. mikhailov revised this gist Jan 22, 2014. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  10. mikhailov created this gist Jan 22, 2014.
    27 changes: 27 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    <Server>
    <Service name="Catalina">

    <Connector port="8080"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    tcpNoDelay="1"
    proxyPort="8000"
    socket.txBufSize="64000"
    socket.rxBufSize="64000"

    maxThreads="50"
    minSpareThreads="10"
    enableLookups="false"
    maxHttpHeaderSize="8192"
    acceptCount="100"
    disableUploadTimeout="true"

    connectionTimeout="20000"
    useBodyEncodingForURI="true"
    />

    ...

    </Service>
    </Server>


    46 changes: 46 additions & 0 deletions gistfile2.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    echo 'events {
    worker_connections 1024;
    }

    error_log /usr/local/Cellar/nginx/1.5.8/error.log;

    http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 120;
    gzip on;
    gzip_comp_level 3;
    gzip_proxied any;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml;

    client_max_body_size 10M;
    access_log /dev/null;


    upstream jira_upstream {
    server 127.0.0.1:8080 fail_timeout=30s;
    keepalive 8;
    }

    server {
    listen 8000;

    location /jira {
    proxy_pass http://jira_upstream/jira;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-for $remote_addr;
    proxy_connect_timeout 120;
    proxy_send_timeout 120;
    proxy_read_timeout 180;

    proxy_http_version 1.1;
    proxy_set_header Connection "";
    }
    }
    }