Skip to content

Instantly share code, notes, and snippets.

@kgriffs
Created November 28, 2012 13:35
Show Gist options
  • Save kgriffs/4161323 to your computer and use it in GitHub Desktop.
Save kgriffs/4161323 to your computer and use it in GitHub Desktop.
nginx security
# See also http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/4/
server_tokens off;
client_max_body_size 4096k;
client_header_timeout 10;
client_body_timeout 10;
keepalive_timeout 10 10;
send_timeout 10;
location /personal/ {
allow 192.168.1.0/24;
allow 127.0.0.1;
deny all;
}
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment