I am trying to setup nginx for reverse proxy. But I have to do it for multiple servers which are basically for different regions. I have three regions APAC, Australia, Japan
location /au/myEndPoint1 {
proxy_pass https://AUSTRALIA_SERVER/myEndPoint1 ;
}
location /jp/myEndPoint1 {
proxy_pass https://JAPAN_SERVER/myEndPoint1 ;
}
location /myEndPoint1 {
proxy_pass https://APAC_SERVER/myEndPoint1 ;
}
location /au/myEndPoint2 {
proxy_pass https://AUSTRALIA_SERVER/myEndPoint2 ;
}
location /jp/myEndPoint2 {
proxy_pass https://JAPAN_SERVER/myEndPoint2 ;
}
location /myEndPoint2 {
proxy_pass https://APAC_SERVER/myEndPoint2 ;
}
But when I test this for /au/myEndPoint1, I received request sometimes on location /myEndPoint1 and sometimes on /au/myEndPoint1.