server_name "";
Peter Leonov
gojpeg at gmail.com
Sat Dec 19 01:51:13 MSK 2009
On 19.12.2009, at 1:14, Sean Allen wrote:
> we are running 0.7.64
>
> have this as a server:
>
> server
> {
> server_name "";
>
> location /
> {
> return 404;
> }
> }
>
> when we try to startup we get:
>
> [emerg]: the first server name must not be empty in
> /ah/conf/nginx/default_server.conf:4
>
> wiki says:
>
> Since nginx 0.7.12, an empty server name is supported, to catch the
> requests without "Host" header:
>
> server {
> server_name "";
> }
We use the underscore + listen default.
server
{
server_name _;
listen 80 default;
location / { return 404; }
}
More information about the nginx
mailing list