9

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 ?

Aashish P
  • 1,894
  • 5
  • 22
  • 36

1 Answers1

15

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

Simon
  • 12,018
  • 4
  • 34
  • 39
  • same note goes for django and [modwsgi daemon mode](https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/#daemon-mode) – Vlad M Oct 12 '16 at 14:23