I have seen plenty of previous messages related to my problem, but no answer could get rid of my "500 Server internal Error" so I try to post my conf to get help.
Error Message:
[Fri Jun 24 17:05:23.631270 2016] [authz_core:error] [pid 15187:tid 140715758237440] [client 127.0.0.1:47873] AH01630: client denied by server configuration: /home/www/waves/
[Fri Jun 24 17:05:23.631568 2016] [:error] [pid 15186:tid 140715648984832] ['/home/marc/.virtualenvs/waves/lib/python2.7/site-packages', '/home/www/waves', '/usr/local/lib/python2.7/dist-packages/setuptools-20.6.7-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
[Fri Jun 24 17:05:23.631660 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] mod_wsgi (pid=15186): Target WSGI script '/home/www/waves/waves_services/wsgi.py' cannot be loaded as Python module.
[Fri Jun 24 17:05:23.631675 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] mod_wsgi (pid=15186): Exception occurred processing WSGI script '/home/www/waves/waves_services/wsgi.py'.
[Fri Jun 24 17:05:23.631686 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] Traceback (most recent call last):
[Fri Jun 24 17:05:23.631710 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] File "/home/www/waves/waves_services/wsgi.py", line 18, in
[Fri Jun 24 17:05:23.631731 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] from django.core.wsgi import get_wsgi_application
[Fri Jun 24 17:05:23.631743 2016] [:error] [pid 15186:tid 140715648984832] [remote 127.0.0.1:50665] ImportError: No module named django.core.wsgi
My django app do not load in apache wsgi mode, I tried many solutions but still don't work. Here is my confs files : Virtual host :
<VirtualHost *:80>
ServerName dev.www.waves.com
ServerAlias www.waves.com
ServerAdmin [email protected]
DocumentRoot /home/www/waves
Alias media/ /home/www/waves/media/
Alias static/ /home/www/waves/static/
<Directory /home/www/waves>
Require all granted
</Directory>
<Directory /home/www/waves/staticfiles>
Require all granted
</Directory>
<Directory /home/www/waves/media>
Require all granted
</Directory>
WSGIDaemonProcess waves python-path=/home/marc/.virtualenvs/waves/lib/python2.7/site-packages:/home/www/waves
WSGIProcessGroup waves
WSGIScriptAlias /waves /home/www/waves/waves_services/wsgi.py
<Directory /home/www/waves/waves_services>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
<Directory /home/marc/.virtualenvs/waves/lib/python2.7/>
Require all granted
</Directory>
My wsgy.py content :
from __future__ import unicode_literals
import os
import sys
import site
print sys.path
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "waves_services.settings.production")
application = get_wsgi_application()
I traced to sys.path content in apache error log, and the virtualenv in in sys.path. Django is installed in this virtualenv (I had first tried to install django 'globally' but the error was just moved to the first 'application specific' import : environ contained in my settings file. The virtual env was created with virtualenvwrapper (any impact ?)
I tried as well to change ownership of virtualenv file, changed 'execution' flag as well, but still I get this ... 500 Server Error.
I would be grateful to get a clue of what is happening ! thanxs