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 modified @kolbyjack code to make it work for
http://website1/service http://website1/service/
with parameters
location ~ ^/service/?(.*) { return 301 http://service_url/$1$is_args$args; }