Is it possible to host multiple django projects in the same domain?

I need to put different Django projects using Django CMS in the same domain, for example:

  • example.com/2012/
  • example.com/2014/

I usually use virtualenv and mod_wsgi for each domain / project. I will need different databases, media files and versions of Django.

Including projects in different subdomains is not an option here.

Can this be done? How to configure the server? Are there any reservations I should know?

+1
source share
1 answer

Yes.

Apache/mod_wsgi URL- WSGI. virtualenvs, Django . :

WSGIScriptAlias /2012/ /location/to/my/files/website1.wsgi
WSGIScriptAlias /2014/ /location/to/my/files/website2.wsgi

WSGI virtualenv Django.

, Django, django.contrib.sites. Site, "-". Django.

+2

Source: https://habr.com/ru/post/1681022/


All Articles