Skip to content

Instantly share code, notes, and snippets.

@urre
Created October 30, 2012 19:20
Show Gist options
  • Save urre/3982386 to your computer and use it in GitHub Desktop.
Save urre/3982386 to your computer and use it in GitHub Desktop.
Nginx restrictions
# Global restrictions configuration file.
# Designed to be included in any server {} block.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment