Rewrite or proxy_pass to internal ip ?

Francis Daly francis at daoine.org
Mon Oct 29 09:51:42 UTC 2012


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



More information about the nginx mailing list