Mam vlastni virtual, apache tam byt nemusi. Pouzivam vlastni GIT. Gunicorn je tedy lepsi volba ?
JInak v logu je :
[Tue Oct 24 23:07:31.794450 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] mod_wsgi (pid=2665): Target WSGI script '/var/www/html/portal/test2/wsgi.py' cannot be loaded as Python mo
dule.
[Tue Oct 24 23:07:31.794501 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] mod_wsgi (pid=2665): Exception occurred processing WSGI script '/var/www/html/portal/test2/wsgi.py'.
[Tue Oct 24 23:07:31.794559 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] Traceback (most recent call last):
[Tue Oct 24 23:07:31.794574 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] File "/var/www/html/portal/test2/wsgi.py", line 12, in <module>
[Tue Oct 24 23:07:31.794578 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] from django.core.wsgi import get_wsgi_application
[Tue Oct 24 23:07:31.794589 2017] [wsgi:error] [pid 2665] [remote
10.5.6.196:50218] ImportError: No module named 'django'
konfigurace apache :
<VirtualHost *:80>
ServerName
portal.test.cz WSGIDaemonProcess portal threads=5 python-home=/var/www/html/portal/env python-path=/var/www/html/portal
WSGIScriptAlias / /var/www/html/portal/test2/wsgi.py
WSGIProcessGroup portal
#Your static files location
Alias /static /var/www/html/portal/static/
<Directory /var/www/html/portal/static>
Require all granted
</Directory>
<Location "/media">
SetHandler None
</Location>
<LocationMatch "\.(jpg|gif|png|js|css)$">
SetHandler None
</LocationMatch>
<Directory /var/www/html/portal/test2>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
Dne úterý 24. října 2017 23:41:40 UTC+2 Messa napsal(a):