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.
SubjectAuthorPosted

Rewrite or proxy_pass to internal ip ?

hristocOctober 29, 2012 04:03AM

Re: Rewrite or proxy_pass to internal ip ?

Francis DalyOctober 29, 2012 05:52AM

Re: Rewrite or proxy_pass to internal ip ?

hristocOctober 29, 2012 06:43AM

Re: Rewrite or proxy_pass to internal ip ?

Francis DalyOctober 29, 2012 05:06PM

Re: Rewrite or proxy_pass to internal ip ?

hristocOctober 30, 2012 04:51AM

Re: Rewrite or proxy_pass to internal ip ?

Francis DalyOctober 30, 2012 03:50PM

Re: Rewrite or proxy_pass to internal ip ?

hristocOctober 31, 2012 05:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 156 on March 20, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready