我正在尝试在centos上设置“apache + uWSGI”。 但是我收到以下错误:
无效的命令“uWSGISocket”,可能是拼写错误..
为此,我find了一个解决scheme,我需要一个名为:
中的libapache2-MOD-uwsgi
但是,在该包没有可用的centos。 现在我很困惑是否可以在centos上configuration“apache + uWSGI”? 以下是我的虚拟主机configuration:
LoadModule wsgi_module modules / mod_wsgi.so WSGISocketPrefix / var / run / wsgi
ServerName www.example.com ServerAlias example.com DocumentRoot /usr/src/example/templates <Location /> SetHandler uwsgi-handler uWSGISocket 127.0.0.1:3031 </Location> <Directory /usr/src/example/templates> Order allow,deny Allow from all </Directory>
请帮忙
Afaik稳定的CentOS太老了,不能有某种forms的uWSGI包。 顺便安装是非常容易的。 pip install uwsgi将绰绰有余。 或者最终你可以下载稳定的tarball并运行make 。 构buildmod_uwsgi (或mod_proxy_uwsgi )可能会更mod_uwsgi一点(一定要安装apache开发标题)。
从uWSGI源代码中的'apache2'目录运行它:
apxs2 -i -c mod_uwsgi.c
更多信息在这里