Add 'catch-all' server block to suppress Invalid HTTP_HOST exception

This commit is contained in:
Natt Piyapramote 2017-05-21 11:06:17 +07:00 committed by Natt P
parent 7c7176d4f9
commit ef7d3e10f5

View File

@ -93,4 +93,13 @@ http {
}
# catch-all block to prevent Invalid HTTP_HOST header exception
server {
listen 80 default_server;
listen 443 ssl default_server;
ssl_certificate /etc/letsencrypt/live/___my.example.com___/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/___my.example.com___/privkey.pem;
server_name _;
return 444;
}
}