Rewrite or proxy_pass to internal ip ?
hristoc
nginx-forum at nginx.us
Mon Oct 29 09:40:39 UTC 2012
Hello,
I want to ask a question about what I to use proxy_pass or rewrite and how
to use them. Basicly I want to redirect connection to internal server for
example if user hit: www.mydomain.com/admin/ nginx to redirect all requests
to http://192.168.1.1/.
I made this with:
location /admin {
proxy_pass http://192.168.1.1:80;
proxy_set_header X-Real-IP $remote_addr;
}
But I got Error from http://192.168.1.1 admin does not exists. What I to do
to redirect all requsts after /admin on web server to internal server with
admin ?
Regards,
C.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232298,232298#msg-232298
More information about the nginx
mailing list