diff --git a/sites-available/example.com b/sites-available/example.com index bc56697..0ae72f2 100644 --- a/sites-available/example.com +++ b/sites-available/example.com @@ -14,9 +14,9 @@ server { } server { - # listen 80 default_server deferred; # for Linux - # listen 80 default_server accept_filter=httpready; # for FreeBSD - listen 80 default_server; + # listen 80 deferred; # for Linux + # listen 80 accept_filter=httpready; # for FreeBSD + listen 80; # The host name to respond to server_name example.com; diff --git a/sites-available/no-default b/sites-available/no-default index 9b8f8ab..908b468 100644 --- a/sites-available/no-default +++ b/sites-available/no-default @@ -1,3 +1,10 @@ +# Drop requests for unknown hosts +# +# If no default server is defined, nginx will use the first found server. +# To prevent host header attacks, or other potential problems when an unknown +# servername is used in a request, it's recommended to drop the request +# returning 444 "no response". + server { listen 80 default_server; return 444;