Hello!
I have a reverse proxy setup like this...
server {
.......
.......
if ($host = '23.71.33.142' ) { proxy_set_header Host www.domain.com; }
location / { proxy_pass http://31.186.1.131:60/; }
}
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 (23.71.33.142) as the header (by using http://23.71.33.142) I need to send hardcoded the header to the backend server si my backend server knows it should respond with the content of domain.com . If they send any other header then it needs to be past to the backend server to deal with intact (it can be domain.com / www.domain.com / sub.domain.com )
Thanks!
--Mike
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx