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 Answer 1

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!

Sign up to request clarification or add additional context in comments.

2 Comments

(2) is incorrect, The python-home option should not be pointing at site-packages directory. See documentation on using virtual environment with mod_wsgi. modwsgi.readthedocs.io/en/develop/user-guides/…
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.