nginx/conf.d/security.conf

29 lines
659 B
Plaintext
Raw Normal View History

2014-08-26 00:19:25 +02:00
# Global security settings for nginx
ignore_invalid_headers on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
##
# This section does not work yet... don't know why
# Only requests to our Host are allowed
# if ( $host !~ ^($server_name)$ )
# {
# return 444;
# }
# Only allow these request methods
# Do not accept DELETE, SEARCH and other methods
# if ( $request_method !~ ^(GET|HEAD|POST)$ )
# {
# return 444;
# }
## Deny certain Referers ###
# if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen) )
# {
# return 404;
# return 403;
# }