I've have two server blocks, testing with different server_name but same destination.
server {
listen 80;
server_name api.x.com;
location / {
proxy_pass http://localhost:3000;
}
}
server {
listen 80;
server_name y.io;
location / {
proxy_pass http://localhost:3000;
}
}
the first server block (api.x.com) works as expected. however y.io is returning 404. regardless if i'm trying to proxy_pass or sending back static index.html
Both domain have the same DNS configuration (if i remove the server_block for y.io, than y.io will give me the default nginx welcome page.)
How should i debug this?