Please share the 'recipe' of the Apache 2 web server synchronization with the Django project. I use Ubuntu 16.04, Server version: Apache / 2.4.18 (Ubuntu). Django version 1.9.
Here is what I tried (from the Django documentation):
WSGIScriptAlias / home/anton/projects/django_dir/films/films/wsgi.py WSGIPythonPath /home/anton/projects/django_dir/films <Directory /home/anton/projects/django_dir/films/films> <Files wsgi.py> Require all granted </Files> </Directory> This is the /etc/apache2/sites-available/000-default.conf file. When querying for localhost error is as follows:
Internal Server Error
I was unable to complete your request.
If you’re not happy, you’re just waiting for this error.
May be available in the server error log.
Content of my wsgi.py:
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "films.settings") application = get_wsgi_application()