roles/nginx: Return HTTP 444 for requests to invalid hostnames

444 is a special nginx return code that means the request was
closed without a response, see:

    http://nginx.org/en/docs/http/request_processing.html
This commit is contained in:
Alan Orth 2016-04-25 21:45:21 +03:00
parent 37b4809546
commit 03519831cb
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -7,7 +7,7 @@ server {
listen [::]:80 default; listen [::]:80 default;
server_name _; server_name _;
return 403; return 444;
} }
server { server {
listen 443 ssl http2 default; listen 443 ssl http2 default;
@ -34,5 +34,5 @@ server {
# of such infrastructure, consider turning off session tickets: # of such infrastructure, consider turning off session tickets:
ssl_session_tickets off; ssl_session_tickets off;
return 403; return 444;
} }