Skip to content

Instantly share code, notes, and snippets.

@ataliba
Created November 11, 2013 14:14
Show Gist options
  • Select an option

  • Save ataliba/7413780 to your computer and use it in GitHub Desktop.

Select an option

Save ataliba/7413780 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80 default ipv6only=on;
server_name chat.ataliba.net;
rewrite ^ https://$server_name$request_uri? permanent;
add_header Strict-Transport-Security max-age=31536000;
location / {
root /var/www;
index index.html index.htm;
}
}
# HTTPS server
server {
listen 443;
server_name chat.sparklingclouds.nl;
add_header Strict-Transport-Security max-age=31536000;
ssl on;
ssl_certificate /etc/ssl/cert.crt;
ssl_certificate_key /etc/ssl/key.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:RC4:HIGH:!MD5:!aNULL:!EDH;
ssl_prefer_server_ciphers on;
location / {
root /var/www;
index index.html index.htm;
}
location /http-bind {
proxy_buffering off;
tcp_nodelay on;
keepalive_timeout 55;
proxy_pass http://127.0.0.1:5280/http-bind;
}
}
Save it and restart NGINX:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment