Skip to content

Instantly share code, notes, and snippets.

@ChristopherBiscardi
Forked from lukehoersten/nginx.conf
Created February 16, 2014 01:42
Show Gist options
  • Save ChristopherBiscardi/9028063 to your computer and use it in GitHub Desktop.
Save ChristopherBiscardi/9028063 to your computer and use it in GitHub Desktop.
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
ssl_certificate ssl-bundle.crt;
ssl_certificate_key ssl-private.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
ssl_prefer_server_ciphers on;
server {
listen 80 default_server;
listen 443 ssl default_server;
server_name _;
return 444;
}
server {
listen 443 ssl;
server_name www.racemetric.com;
return 301 https://racemetric.com$request_uri;
}
server {
listen 80;
server_name racemetric.com www.racemetric.com;
return 301 https://racemetric.com$request_uri;
}
server {
listen 443 ssl;
server_name racemetric.com;
add_header Strict-Transport-Security max-age=15768000;
location / {
proxy_pass http://127.0.0.1:8080;
}
location /static/ {
alias static/;
autoindex off;
expires max;
add_header Cache-Control public;
}
location /robots.txt {
alias static/internal/robots.txt;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment