I've done before many setups of both uWSGI for django applications and flask for python-plugin under ubuntu along with Nginx as web server. I've always done it in one box..
As now, we are having a security need to separate application servers from web servers. I cannot seem to find a way to get it to work, uWSGI sockets not accessible beyond local host.
Below is an example to one setup
uWSGI / domain.ini
[www]
vhost = true
plugins = python
master = true
enable-threads = true
processes = 1
wsgi-file = /app/xx-env/xx/rr/misc/settings/sites/default/wsgi.py
virtualenv = /app/xx-env/
chdir = /app/snowflake-env/rr
touch-reload = /app/xx-env/xx/rr/misc/settings/sites/default/uwsgi-reload
socket=0.0.0.0:9002
Here is my nginx conf
server {
listen 80;
server_name xx.example.com websrv-a.example.com;
access_log /var/log/nginx/access.xx.log;
error_log /var/log/nginx/error.xx.log;
location / {
try_files $uri @uwsgi;
}
location @uwsgi {
include uwsgi_params;
uwsgi_pass 10.0.0.78:9002;
}
}
Any ideas on how I could accomplish this? any hints would be very much appreciated.