Configuration of Django+WSGI+Apache

I have a Debian 11 system with Apache2 2.4.6.2, mod_wsgi 4.7.1 and Python 3.9. I want to run two different Django projects under the same Apache2 server, and in the same virtual host as outlined e.g. here:

http://www.tobiashinz.com/2019/04/10/apache-django-virtualenv.html

The following additions in the apache2.conf have worked fine to get one Django project online:

WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess myapp python-home=/var/www/myproj/venv3/ python-path=/var/www/myproj/myproj
WSGIProcessGroup myapp
WSGIScriptAlias / /var/www/myproj/myproj/wsgi.py

To configure the second Django, I first tried to move the configuration of the first project to a virtual host section. However, if I move the configurations to a virtual host in available-sites (e.g. in 000-default.conf), I do not get any error message (e.g. in the apache error log), but instead of my Django project, I see the default apache2 landing page ("It works!"), even if I comment out DocumentRoot. Am I missing something?

Вернуться на верх