<uwsgi>
<chdir>/srv/mobile-site/app/</chdir>
<wsgi-file>/srv/mobile-site/app/mobilecms.py</wsgi-file>
<callable>app</callable>
<socket>/tmp/foo.sock</socket>
<chmod-socket>666</chmod-socket>
<master />
<processes>1</processes>
<disable-logging /><!-- Errors are still logged; this just disables request logging which Cherokee takes care of -->
<vacuum />
<no-orphans />
</uwsgi>
请注意,Cherokee uWSGI 向导不接受此文件作为有效的配置文件(因此需要手动配置)。
Roberto's suggestion is a good one; it will help diagnose where the error is occurring (i.e. whether it's uWSGI or Cherokee).
I've also recently fought to get uWSGI and Cherokee to work together. I ended up configuring the uWSGI source in Cherokee manually:
In Cherokee Admin, under the "Sources" tab, add a new source with nickname "uWSGI Source" and socket "/tmp/foo.sock"
Change the type to "Local Interpreter"
In the interpreter field, enter: /usr/local/bin/uwsgi -x /path/to/uwsgiconfig.xml
In rule management for the virtual server, click to add a new behaviour rule.
Choose a manual configuration of type "Directory" with a path of "/"
Set the handler to "uWSGI"
Scroll to the bottom and set "Round Robin" for the balancer
Add the "uWSGI Source" information source
Save changes and restart Cherokee
In my uWSGI config file I have something like this (adapted to your example):
<uwsgi>
<chdir>/srv/mobile-site/app/</chdir>
<wsgi-file>/srv/mobile-site/app/mobilecms.py</wsgi-file>
<callable>app</callable>
<socket>/tmp/foo.sock</socket>
<chmod-socket>666</chmod-socket>
<master />
<processes>1</processes>
<disable-logging /><!-- Errors are still logged; this just disables request logging which Cherokee takes care of -->
<vacuum />
<no-orphans />
</uwsgi>
Note that the Cherokee uWSGI wizard doesn't accept this as a valid configuration file (hence the manual configuration).
发布评论
评论(2)
罗伯托的建议是一个很好的建议;它将有助于诊断错误发生的位置(即是 uWSGI 还是 Cherokee)。
我最近还努力让 uWSGI 和 Cherokee 一起工作。我最终在 Cherokee 中手动配置 uWSGI 源:
/usr/local/bin/uwsgi -x /path/to/uwsgiconfig.xml
在我的 uWSGI 配置文件中,我有类似的内容(适合您的示例):
请注意,Cherokee uWSGI 向导不接受此文件作为有效的配置文件(因此需要手动配置)。
Roberto's suggestion is a good one; it will help diagnose where the error is occurring (i.e. whether it's uWSGI or Cherokee).
I've also recently fought to get uWSGI and Cherokee to work together. I ended up configuring the uWSGI source in Cherokee manually:
/usr/local/bin/uwsgi -x /path/to/uwsgiconfig.xml
In my uWSGI config file I have something like this (adapted to your example):
Note that the Cherokee uWSGI wizard doesn't accept this as a valid configuration file (hence the manual configuration).
在投入生产之前,请务必尝试在没有网络服务器的情况下部署 uWSGI。
uwsgi -x
会打印很多信息/错误
Always try uWSGI deploy without a webserver, before going in production.
uwsgi -x
<xmlfile>
It will print a lot of information/errors