I am trying to deploy a Flask and uwsgi application with Nginx, everything is working and I can get my application to work on my domain: test.example.com:8080
.
The problem is I can't make it work under the default port 80, I get the following error message from Nginx when I try to browse test.example.com
:
2016/09/02 10:21:29 [error] 2947#2947: *3 no live upstreams while connecting to upstream, client: 75.xxx.xxx.136, server: test.example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://localhost", host: "test.example.com", referrer: "http://test.example.com/"
This is my uwsgi command:
uwsgi --socket 8080 --chdir /var/www/test.example.com --protocol=http --module myapp:app
And this is my Nginx config:
server {
listen 80;
root /var/www/test.example.com;
server_name test.example.com;
location / {
include uwsgi_params;
uwsgi_pass 0.0.0.0:8080;
uwsgi_param SCRIPT_NAME /myapp;
}
}
Nginx can't just pass the traffic to port 8080 from 80 for my server, I don't know why.