[Django]-Multiple domains, multiple django projects, one server

3👍

You can have 2 virtual hosts in your apache configuration.

The first virtual host on (default) – port 80
second one on port 81

In the virtual host, you can specify it this way:

NameVirtualHost *:80

<VirtualHost *.80>
   DocumentRoot django_project_1_path
   .... other config
   WSGIScriptAlias / path_to_wsgi_config_1
</VirtualHost>

NameVirtualHost *:81

<VirtualHost *.81>
   DocumentRoot django_project_2_path
   .... other config
   WSGIScriptAlias / path_to_wsgi_config_2
</VirtualHost>

Leave a comment