问题描述
我正在使用 mod_wsgi 在 Apache2 上部署我的 web.py 应用程序.
I am deploying my web.py application on Apache2 with mod_wsgi.
这是我的 virt_host 文件,
Here is my virt_host file,
WSGIPythonPath /home/ubuntu/plotwatt/libplotwatt:/home/ubuntu/plotwatt/pwstage/src
<VirtualHost *:20108>
ServerAdmin gslabrails.dev.plotwatt.com
DocumentRoot /var/www
WSGIScriptAlias / /var/www/currentcost/server.py
WSGIDaemonProcess currentcost user=ubuntu group=ubuntu processes=5 threads=3
WSGIProcessGroup currentcost
WSGIApplicationGroup %{GLOBAL}
AddType text/html .py
<Directory /var/www/currentcost/>
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/currentcost_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/currentcost_access.log combined
</VirtualHost>
我在 WSGIPythonPath 中给出了名为 redisStage 的库的路径.但是,它似乎对我不起作用.我是否进行了任何错误的配置?我不能将 WSGIPythonPath 指令放入 VitualHost 指令中.应该是什么原因?
I have given path to my lib named redisStage in WSGIPythonPath. But, it seems to be not working for me. Am i making any wrong configuration?I can't put WSGIPythonPath directive inside VitualHost directive.What must be the reason ?
推荐答案
根据 文档,在使用守护进程模式时不能使用 WSGIPythonPath
.改用 WSGIDaemonProcess 指令的python-path"选项.
According to the docs, you cannot use WSGIPythonPath
when using daemon mode. Use the 'python-path' option to the WSGIDaemonProcess directive instead.
这篇关于WSGIPythonPath 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!