I have been banging my head on the wall with this. Any help that can be offered would be greatly appreciated.
I have handful of websites/services running on various different servers. I have a reverse proxy running on a server here at home to route different subdomains to their destinations elsewhere. I create a new conf, I indicate where my proxy_pass should be going to. My /etc/nginx/conf.d has the many different configs but to keep it simple, let's say I have these three:
a.conf
b.conf
c.conf
Let's say c.conf is the new one I've created/working on setting up. Here is it's contents:
server {
listen 80;
server_name newsubdomain.root.net;
location / {
proxy_pass http://222.222.222.222:4011;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#upgrade to WebSocket protocol when requested
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
where http://222.222.222.222:4011 is my (obfuscated) destination.
When navigating to newsubdomain.root.net, I end up landing at the proxy_pass that was configured in a.conf. While trying to troubleshoot, I've renamed a.conf to a.conf.bak. Now when navigating to newsubdomain.root.net, I am landing at the proxy_pass that is defined in b.conf.
It has to be something simple that I am missing but I'm at a loss at this point. I've setup tons of new configs this way (20+ on this server) with no issue and nothing has changed since then (at least to my knowledge, I'm the only one who accesses this server.)
I've searched for a solution to this but my search terms are not rendering anything pertinent. I am happy to provide any logs/additional information needed.
Thanks in advance to anyone who can lend some advice.