Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jira connection optimised (Nio enabled, gzip disabled on Tomcat, but enabled on Reverse proxy side, Proxy with HTTP 1.1 keep-alive, SSL offload, SPDY). Nginx 1.5.10+ recommended.
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=120s;
keepalive 8;
}
server {
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;
proxy_redirect off;
proxy_buffering 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 "";
}
}
}
<Server>
<Service name="Catalina">
<Connector port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https"
proxyName="localhost"
proxyPort="8000"
socket.txBufSize="64000"
socket.rxBufSize="64000"
maxThreads="25"
minSpareThreads="5"
enableLookups="false"
maxHttpHeaderSize="8192"
acceptCount="100"
disableUploadTimeout="true"
connectionTimeout="60000"
maxKeepAliveRequests="25"
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>
....
</Engine>
</Service>
</Server>
@lisovskyvlad

This comment has been minimized.

Copy link

commented Jan 27, 2014

ох, у тебя получается nginx настраивать? где научился?))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.