I have an UWSGI application and a Celery/Flower task worker/monitor. They are deployed on Azure App Service as a multi-container application.
Locally I am routing jobs to the worker by using "HOST: worker" in the HTTP request. The task monitor is set as default_server. Both are listening on port 80, since Azure App Service only allows exposing port 80/443. Everything works fine locally (using docker-compose). However, when deployed to Azure App Service, the routing of the request does not work and Azure App Service returns a 404 error with a recommendation to set up a custom domain.
What are my options for fixing this without setting up a custom domain.
Here is my nginx.conf
server {
listen 80;
server_name worker;
location / {
include uwsgi_params;
uwsgi_pass flask:5001;
}
}
server {
listen 80 default_server;
server_name monitor;
charset utf-8;
location / {
proxy_pass http://monitor:5555;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}