Rewrite or proxy_pass to internal ip ?
hristoc
nginx-forum at nginx.us
Mon Oct 29 11:30:00 UTC 2012
Francis Daly Wrote:
-------------------------------------------------------
> On Mon, Oct 29, 2012 at 05:40:39AM -0400, hristoc wrote:
>
> Hi there,
>
> > 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 ?
>
> http://nginx.org/r/proxy_pass
>
> See the part that starts "A request URI is passed to the server as
> follows:"
>
> The short version is:
>
> proxy_pass http://192.168.1.1:80/;
>
> f
> --
> Francis Daly francis at daoine.org
>
Thank you,
one step forward but now I receive error 502 bad gateway. Server
mydomain.com have 2 Ethernet. First one with realip that I connect, second
one with virtual 192.168.1.2 connected to internal network. I don't want to
add in my fw redirect rule, so I expect to do it over the web. When I access
realip or domain name in that directory, I actually to see the web of my
internal server located somewhere in local network.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232298,232315#msg-232315
More information about the nginx
mailing list