I am wanting to use multiple files declared at
/etc/nging/sites-available/
symlinked to:
/etc/nginx/sites-enabled/
Now the files look similar to below - call this team1.conf:
server {
listen 80;
location /team1/app3/location/region {
rewrite ^/team1/app3/location/region(.*) /path3/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
location /team1/app4/location/region {
rewrite ^/team1/app4/location/region(.*) /path4/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
location /team1/app5/location/region {
rewrite ^/team1/app5/location/region(.*) /path5/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
}
Call this team2.conf:
server {
listen 80;
location /team2/app3/location/region {
rewrite ^/team2/app3/location/region(.*) /path3/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
location /team2/app4/location/region {
rewrite ^/team2/app4/location/region(.*) /path4/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
location /team2/app5/location/region {
rewrite ^/team2/app5/location/region(.*) /path5/healthcheck$1 break;
proxy_pass https://this.is.the.backend.app.example;
}
}
I wanted to keep them separate - hence the separate files - however, with two files, nginx just seems to read the first one and 404 anything in the second one - so I suspect there is a conflict somewhere....
The files are pretty arbitrary - I just wanted to demonstrate - the paths etc, will vary between files..
Any help would be great - apologies if I've missed something obvious..
Cheers