Skip to content

Instantly share code, notes, and snippets.

@nobiki
Last active December 20, 2018 10:05
Show Gist options
  • Save nobiki/3336de6189cd7fb8c30f01c760834bc9 to your computer and use it in GitHub Desktop.
Save nobiki/3336de6189cd7fb8c30f01c760834bc9 to your computer and use it in GitHub Desktop.
##
# HTTP
upstream example.local {
server 172.56.0.12;
# server 172.56.0.12:3000;
}
server {
autoindex off;
client_max_body_size 100M;
listen 80;
server_name example.local;
location / {
proxy_pass http://example.local/;
break;
}
}
##
# HTTPS
server {
client_max_body_size 100M;
listen 443 ssl;
server_name example.local;
# ssl_protocols TLSv1.2 SSLv2 SSLv3 TLSv1;
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_certificate /etc/pki/tls/certs/example.local.crt;
ssl_certificate_key /etc/pki/tls/certs/example.local.key;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains;preload';
location / {
proxy_pass https://example.local/;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment