If you want to match some regular routes, use a proxy
location /chat/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://newmessage;
}
I want all routes starting with /chat/ to be proxied, such as /chat/send/. The above way of writing will work.
But want to add multiple matches
location /chat/ or /a/ or /b/ {
I checked some information online
location /(chat|a|b)/ {
This doesn't work either.
Add a tilde