# NGINX # FILE: /usr/local/etc/nginx/conf.d/security.conf # Disable all methods besides HEAD, GET, and POST if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; } # Block access to "hidden" files and directories whose names begin with a # period. This includes directories used by version control systems such # as Subversion or Git to store control files. location ~ (^|/)\. { access_log off; log_not_found off; return 404; } # Deny obviously bad requests location ~ \.(aspx|asp|jsp|cgi)$ { return 410; }