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() 
  • What does sync mean? - andreymal
  • @andreymal, this means that the Django project uses the apache web server, and not manage.py runserver. That is, the client (browser) will interact with apache. - Anton
  • About this is not only in bulk in Google, but in the official documentation django is, no? - andreymal
  • @andreymal yes, there are quite a few. But I have already tried a lot there (and oddly enough it does not work, including from official documentation). I will not leave the question on stackoverflow without first running it. - Anton
  • Won't you leave the question on stackoverflow, without first explaining what you tried and why it didn't work;) - andreymal

0