是否可以在同一服务器上运行两个单独的uWSGI进程,Nginx提供两组静态文件?
到目前为止,这种设置似乎有时会起作用,但有时请求失败......
nginx.conf :
http {
upstream deploy {
server 127.0.0.1:8002;
}
server {
# nginx config - deploy
}
upstream staging {
server 127.0.0.1:8001;
}
server {
# nginx config - staging
}
}
我在两个uWSGI.ini文件master=True
上都有。这是他们俩的样子:
uwsgi.ini
[uwsgi]
home = /home/bsdev/.virtualenvs/bs_py34/
env = DJANGO_SETTINGS_MODULE=myproject.settings.persistent
socket = 127.0.0.1:8003
chmod-socket = 666
uid = bsdev
gid = bsdev
master = true
enable-threads = true
processes = 4
chdir = /www/django/releases/persistent/bsrs/bsrs-django/myproject
module = myproject.wsgi:application
pidfile = /tmp/myproject-master-persistent.pid
harakiri = 10
max-requests = 5000
logdate = true
vacuum = true
daemonize = /var/log/uwsgi/myproject-persistent.log
logdate = true
有关如何使其发挥作用的任何想法?
有没有人有工作配置?
似乎让他们都作为主人,或者如果同一个uwsgi进程同时服务,那些请求就会被删除....
提前致谢。
堆栈:
答案 0 :(得分:1)
要举办两个或更多单独的项目,请推荐以下内容: