2012-10-17 18 views
8

Web.py uygulamamı Apache2'de mod_wsgi ile dağıtıyorum.WSGIPythonPath çalışmıyor

İşte

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> 

Ben WSGIPythonPath içinde redisStage adlı benim lib yolunu verdik, benim virt_host dosyasıdır. Ama benim için çalışmıyor gibi görünüyor. Yanlış yapılandırma yapıyorum? WSAGIPythonPath yönergesini VitualHost yönergesine koyamıyorum. Nedeni ne olmalı?

cevap

13

the docs uyarınca, daemon modunu kullanırken WSGIPythonPath kullanamazsınız. Bunun yerine, 'python-yol' seçeneğini WSGIDaemonProcess directive kullanın.

+0

Aynı not django ve [modwsgi daemon modu] için gider (https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/#daemon-mode) –