Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Help needed--reverse proxy to different internal hosts based on url

$
0
0
If you download prove05.zip of my site and check out the file nginx-win-prove.conf;

location /ajptest1/ {
[.............]
rewrite /ajptest1/([^/]+) /$1 break;
ajp_pass tomcats/; # or pass directly to IP
}

I have in my debug log:

2015/02/13 12:09:34 [notice] 1632#2812: *61 "/ajptest1/([^/]+)" matches "/ajptest1/index.html", client: 127.0.0.1, server: localhost, request: "GET /ajptest1/index.html HTTP/1.0", host: "127.0.0.1:880"
2015/02/13 12:09:34 [notice] 1632#2812: *61 rewritten data: "/index.html", args: "", client: 127.0.0.1, server: localhost, request: "GET /ajptest1/index.html HTTP/1.0", host: "127.0.0.1:880"

So I know it works.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>