Proxypass subfolder entries to another link
geopcgeo
nginx-forum at nginx.us
Thu Jun 6 13:16:14 UTC 2013
Dear Support
Currently we have nginx proxypass to tomcat service and is working fine.
server {
listen 80;
server_name app.geo.com;
location / {
if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1
last; } }
location /docs {
proxy_pass http://localhost:8080/officework;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
}
So while accessing app.geo.com/docs/* we are getting the contents of
http://localhost:8080/officework
Now we have another tomcat war folder /homework and while accessing
app.geo.com/docs/home* we need to get the contents of
http://localhost:8080/homework
That is we need as follows:
http://app.geo.com/docs/* -> http://localhost:8080/officework
http://app.geo.com/docs/home/* -> http://localhost:8080/homework
Can anyone please help us to configure this in our nginx.
Thanks
Geo
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239916,239916#msg-239916
More information about the nginx
mailing list