atom feed7 messages in ru.sysoev.nginxRe: Condition to match a missing "Hos...
FromSent OnAttachments
Luigi PerrotiAug 21, 2008 8:19 am 
Igor SysoevAug 21, 2008 8:26 am 
Luigi PerrotiAug 21, 2008 9:16 am 
Igor SysoevAug 21, 2008 9:45 am 
Luigi PerrotiAug 21, 2008 10:21 am 
Igor SysoevAug 21, 2008 10:37 am 
Luigi PerrotiAug 21, 2008 11:20 am 
Subject:Re: Condition to match a missing "Host:" header
From:Luigi Perroti (luig@public.gmane.org)
Date:Aug 21, 2008 10:21:15 am
List:ru.sysoev.nginx

Igor Sysoev <is@...> writes:

You need just:

location = /400.html { root /www/errors; internal; access_log /var/log/nginx/access.log; }

Unfortunately, if I do that the 400 responses that my application sends get logged too. Which I would prefer to avoid.

BTW, in 0.7.12 the special server_name "" will allow to handle requests without Host not in default listening server:

server { listen 80 default; server_name _; }

server { listen 80; server_name www.example.com ""; }

Does that mean that if ($host = "") would evaluate to true if no Host: header is sent? That would precisely be what I need.

-Luigi