2012-10-17 11 views
8

Ich stelle meine web.py-Anwendung auf Apache2 mit mod_wsgi bereit.WSGIPythonPath funktioniert nicht

Hier ist meine virt_host Datei,

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> 

Ich habe meine lib gegebenen Pfad redisStage in WSGIPythonPath benannt. Aber es scheint für mich nicht zu funktionieren. Mache ich eine falsche Konfiguration? Ich kann die WSGIPythonPath-Direktive nicht in die ViualHost-Direktive einfügen. Was muss der Grund sein?

Antwort

13

Gemäß the docs können Sie WSGIPythonPath nicht verwenden, wenn Sie den Daemon-Modus verwenden. Verwenden Sie stattdessen die Option 'python-path' für die WSGIDaemonProcess directive.

+0

gleiche Anmerkung gilt für Django und [modwsgi Daemon-Modus] (https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/#daemon-mode) –