Help with setting proxy_header

Micheal Wolfskill tdgh2323 at
Sat Mar 24 00:40:06 UTC 2012


I have a reverse proxy setup like this...

server {   

             if ($host = '' ) { proxy_set_header Host; }
                location / { proxy_pass;  }


The problem is that i cannot have a proxy_set_header inside an IF like this. Basically what iam intending to do is.. If the remote client visits my server with the IP ( as the header (by using I need to send hardcoded the header to the backend server si my backend server knows it should respond with the content of .  If they send any other header  then it needs to be past to the backend server to deal with intact (it can be / / )



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list