server {
server_name example.com;
location ^~ /proxy/ {
rewrite ^/proxy(/.*)$ $1 break;
proxy_pass http://localhost:8060;
}
location / {
proxy_pass http://localhost:8040;
}
}