Welcome! Log In Create A New Profile

Advanced

Rewrite or proxy_pass to internal ip ?

October 29, 2012 04:03AM
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.
Subject Author Posted

Rewrite or proxy_pass to internal ip ?

hristoc October 29, 2012 04:03AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 29, 2012 05:52AM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 29, 2012 06:43AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 29, 2012 05:06PM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 30, 2012 04:51AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 30, 2012 03:50PM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 31, 2012 05:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready