我正在使用mod_wsgi在Apache2上部署我的web.py应用程序。
这是我的virt_host文件,
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的lib路径。但是,它似乎不适合我。我做错了配置吗? 我不能将WSGIPythonPath指令放在VitualHost指令中。 究竟是什么原因?
答案 0 :(得分:15)
根据the docs,您在使用守护程序模式时无法使用WSGIPythonPath
。请改用WSGIDaemonProcess directive的'python-path'选项。