Nginx配置proxy_pass转发的/路径问题
                            
                                
                                Eave
                            
                            
                                
                                2017.04.19
                            
                            
                        
                        location ^~ /backend1
{
    # /bankend1/merchant => /backend1/merchant
    proxy_pass http://www.gramess.com;
}
location ^~ /backend2
{
    # /bankend2/merchant => //merchant
    proxy_pass http://www.gramess.com/;
}
location ^~ /backend3/
{
    # /bankend3/merchant => /backend3/merchant
    proxy_pass http://www.gramess.com;
}
location ^~ /backend4/
{
    # /bankend4/merchant => /merchant
    proxy_pass http://www.gramess.com/;
}
总结:用一下两种配置即可
# 全路径转发
location ^~ /backend1
{
    # /bankend1/merchant => /backend1/merchant
    proxy_pass http://www.gramess.com;
}
# 只转发/backend4/后的路径
location ^~ /backend4/
{
    # /bankend4/merchant => /merchant
    proxy_pass http://www.gramess.com/;
}