upstream apache { server 127.0.0.1:8080; } server{ location ~* ^/service/(.*)$ { proxy_pass http://apache/$1; proxy_redirect off; } } >
upstream apache { server 127.0.0.1:8080; } server{ location ~* ^/service/(.*)$ { proxy_pass http://apache/$1; proxy_redirect off; } }
I use a slightly modified version of kolbyjack's second approach with ~ instead of ~*.
~
~*
location ~ ^/service/ { proxy_pass http://apache/$uri$is_args$args; }