add a doc block to no-default

and remove the default_server direcdtive from example.com. Since this file
is likely to be the copy-and-paste file for multiple server configs,
don't mark example.com as the default.
This commit is contained in:
AD7six 2013-11-20 20:40:02 +00:00
parent d5f68ed3ad
commit 3921535db8
2 changed files with 10 additions and 3 deletions

View File

@ -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;

View File

@ -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;