uWSGI配置uWSGI虛擬主機問題
[uwsgi]
socket = /tmp/uwsgi.sock
chmod-socket = 666
processes = 1
master = true
vhost = true
no-site = true
Nginx的配置
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;
}
}
我打了不管網站首先是一個還停留顯示,所以如果我轉到站點2第一我無法看到的SITE1 。任何想法爲什麼uWSGI虛擬主機設置似乎不工作?