2012-10-17 4 views
8

Sto distribuendo la mia applicazione web.py su Apache2 con mod_wsgi.WSGIPythonPath non funziona

Ecco il mio file 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> 

ho dato al mio percorso lib chiamato redisStage in WSGIPythonPath. Ma sembra che non funzioni per me. Sto facendo una configurazione sbagliata? Non riesco a inserire la direttiva WSGIPythonPath nella direttiva VitualHost. Quale deve essere la ragione?

risposta

13

Secondo the docs, non è possibile utilizzare WSGIPythonPath quando si utilizza la modalità daemon. Utilizzare invece l'opzione 'python-path' allo WSGIDaemonProcess directive.

+0

stessa nota per django e [modwsgi daemon mode] (https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/#daemon-mode) –