Welcome! Log In Create A New Profile


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.
Subject Author Posted

Proxypass subfolder entries to another link

geopcgeo June 06, 2013 09:16AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready