Empty server name argument - Can't get it to work

Igor Sysoev is at rambler-co.ru
Thu Aug 28 14:49:08 MSD 2008


On Thu, Aug 28, 2008 at 12:46:31PM +0200, Luigi Perroti wrote:

> On 8/28/08, Igor Sysoev <is at rambler-co.ru> wrote:
> 
> > $host is this case is "_", server_name. You should use $http_host.
> 
> Thanks, now logging works fine when no Host: header is specified.
> 
> Still I can't get a request with a missing Host: header to be routed
> to the fastcgi server.
> As mentioned in the previous message I'm using
> 
> server {
>   listen 123.123.123.123:80;
>   server_name _ "";
>   ...
> }
> 
> I also tried with different syntaxes but nginx still serves the custom
> 400 page as soon as it receives a request with a missing Host: header.

I do not understand which requests do you want to pass to fastcgi:

1) any successfull (not 400) requests
2) or any successfull AND 400 requets without Host header ?


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list