在OS X服务器上,我遵循mod_wsgi安装说明,当我运行apachectl -M
时,输出显示mod_wsgi已加载。另一方面,在重新启动服务后打开Apache日志时,没有迹象表明已加载mod_wsgi。我尝试过使用mod_wsgi-express并重新编译并重新安装mod_wsgi,但无济于事。我如何确保Apache实际上正在加载mod_wsgi?
答案 0 :(得分:0)
将此部分添加到您的Apache配置中(可能在/etc/httpd/conf.d
中)并查看它是否有错误?
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName yoursite.com
WSGIDaemonProcess yoursite-http python-home=/home/vagrant/.virtualenvs/yoursite
WSGIScriptAlias / /var/www/html/yoursite/yoursite/wsgi.py process-group=yoursite-http application-group=%{GLOBAL}
<Directory /var/www/html/yoursite/yoursite>
Require all granted
</Directory>
WSGIProcessGroup yoursite-http
</Virtualhost>