Browse Source

Return 403 Forbidden For readme.(txt|html) or license.(txt|html)

old-stable
Mitesh Shah 12 years ago
parent
commit
cd24c02f42
  1. 9
      etc/nginx/common/locations.conf

9
etc/nginx/common/locations.conf

@ -69,20 +69,21 @@ location ~ ^/(status|ping) {
# Security Settings For Better Privacy
# Deny Hidden Files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Deny To .log Extension
location ~* ^.+\.log$ {
deny all;
access_log off;
log_not_found off;
}
location ~ /readme\.(txt|html)$ {
deny all;
access_log off;
log_not_found off;
# Return 403 Forbidden For readme.(txt|html) or license.(txt|html)
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
return 403;
}

Loading…
Cancel
Save