Yes There is a apace between if and ($host .....) Posted at Nginx Forum: http://forum.nginx.org/read.php?2,40554,223466#msg-223466