I have a uwsgi (python flask app) running in a Docker exposed port 8080.
I have an nginx running in another Docker ports 80 and 443.
Here is a snippet from my config
upstream backend {
server my-uwsgi:8080;
}
server {
server_name api.my.app my.app;
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
server {
server_name api.my.app my.app;
...
location = /demo1/byAddress
{
include uwsgi_params;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $remote_addr;
uwsgi_param Host $host;
uwsgi_pass backend;
}
This does stand up, but is non functional.
In the nginx docker I can do telnet my-uwsgi:8080
so I know it can connect to the uwsgi Docker.
But in /var/log/nginx/error.log This is the first entry:
2022/01/10 00:04:49 [emerg] 9#9: host not found in upstream "my-uwsgi:8080" in `/etc/nginx/conf.d/my.conf:10`
I cannot figure out a combination that works, what is the magic that I am missing here?
Thanx