1

Someone can help me why it doesn't work? (my project name is ikh) i'm using ubuntu 16.04 LTS, Apache2 , Python3

ServerAdmin webmaster@localhost
DocumentRoot /var/www/ikh

WSGIDaemonProcess ikh python-path=/var/www/ikh/  python-home=/var/www/ikh/.env
WSGIProcessGroup ikh
WSGIScriptAlias / /var/www/ikh/ikh/wsgi.py

<Directory /var/www/ikh/ikh>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>



ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

1 Answers1

1

i found that some interesting problems :

1 - first should set server to listen the port that i want to deploy on it!

Listen 8000

2 - to use WSGIDaemonProcess should do like this sample that i write it for my apache2 configuration

WSGIDaemonProcess ikh python-path=/var/www/ikh  python-home=/var/www/ikh/env/lib/python3.5/site-packages

and thats about it!

  • (2) is incorrect, The ``python-home`` option should not be pointing at ``site-packages`` directory. See documentation on using virtual environment with mod_wsgi. http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html – Graham Dumpleton Jun 25 '17 at 09:18
  • You verified that what you were using was what ``sys.prefix`` was reported as in the Python interpreter for the virtual environment? It definitely should not be the ``site-packages`` directory for ``python-home``. Doing that would likely result in the Python interpreter failing on startup. – Graham Dumpleton Jun 25 '17 at 10:07