Score:0

Nginx upstream block host not found

ne flag

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

in flag
Is the backend container linked properly in docker?
suprovsky avatar
hu flag
Where do you put default.conf and is the folder you're putting it to included in nginx.conf (like this: `include /etc/nginx/sites-enabled/*;`)?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.