Welcome! Log In Create A New Profile

Advanced

Proxypass subfolder entries to another link

June 06, 2013 09:16AM
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
SubjectAuthorPosted

Proxypass subfolder entries to another link

geopcgeoJune 06, 2013 09:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready