Skip to content

Instantly share code, notes, and snippets.

@firmlab
Forked from urre/restrictions.conf
Created May 4, 2023 03:04
Show Gist options
  • Save firmlab/45deca93db94641b0af4e46a35c3a363 to your computer and use it in GitHub Desktop.
Save firmlab/45deca93db94641b0af4e46a35c3a363 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