uWSGI config
[uwsgi]
socket = /tmp/uwsgi.sock
chmod-socket = 666
processes = 1
master = true
vhost = true
no-site = true
Nginx config
server {
listen 80;
server_name www.site1.com;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
uwsgi_param UWSGI_PYHOME /var/virtualenvs/site1;
uwsgi_param UWSGI_CHDIR /var/www/site1;
uwsgi_param UWSGI_SCRIPT wsgi;
}
}
server {
listen 80;
server_name www.site2.com;
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
uwsgi_param UWSGI_PYHOME /var/virtualenvs/site2;
uwsgi_param UWSGI_CHDIR /var/www/site2;
uwsgi_param UWSGI_SCRIPT wsgi;
}
}
Whatever site I hit first is the one it is stuck displaying, so if I goto site2 first I can't ever see site1. Any thoughts on why the uWSGI vhost setting seems not to be workin?
The problem ending up being that using an INI config file results in uWSGI running in single interpreter mode. The exact same config in XML allows everything to work correctly. The uWSGI developer this would NOT be the case in future versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With