Proxypass subfolder entries to another link

geopcgeo nginx-forum at
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;
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
So while accessing* we are getting the contents of

Now we have another tomcat war folder /homework and while accessing* we need to get the contents of

That is we need as follows:*  	-> 	http://localhost:8080/officework* 	-> 	http://localhost:8080/homework

Can anyone please help us to configure this in our nginx.

Posted at Nginx Forum:,239916,239916#msg-239916

More information about the nginx mailing list