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.