WSGIPythonPath is not working

北战南征 提交于 2019-12-04 19:01:40

问题


I am deploying my web.py application on Apache2 with mod_wsgi.

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>

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 ?


回答1:


According to the docs, you cannot use WSGIPythonPath when using daemon mode. Use the 'python-path' option to the WSGIDaemonProcess directive instead.



来源:https://stackoverflow.com/questions/12931013/wsgipythonpath-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!