本文介绍了WSGIPythonPath无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 05:26