I'm running a nginx container where it maps to another backend container. When I tried adding upstream block in nginx.conf which is like
upstream backend_servers {
server backend:8000;
}
The error that is occuring is
[emerg] 1#1: host not found in upstream "backend:8000" in /etc/nginx/nginx.conf:2
nginx: [emerg] host not found in upstream "backend:8000" in /etc/nginx/nginx.conf:2
But If I place the same block in default.conf it works the container is running successfully. What is the issue with nginx.conf file