How to prevent processing requests with undefined server names on nginx 1.1.17

HKS VIETNAM contact at hksvietnam.com
Mon Mar 26 16:15:17 UTC 2012


Dear,

Thank you so much.

It's OK :) My proplem has been fixed.

Thank you,
Nguyen

-----Original Message-----
From: nginx-bounces at nginx.org [mailto:nginx-bounces at nginx.org] On Behalf Of
Antonio P.P. Almeida
Sent: Monday, March 26, 2012 6:44 PM
To: nginx at nginx.org
Subject: Re: How to prevent processing requests with undefined server names
on nginx 1.1.17

Try:

server {
    listen [::]:80 default_server;
    server_name _;
    return 444;
}

You'll have to define *all valid* hosts in each server block.


--appa

_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list