[Django]-Single Django Application, Multiple Instances

-2👍

You could simply copy the django project to another place and create a new apache site.

For example:

Create a virtual host in /etc/apache2/sites-available/domain.eu_first

<VirtualHost *:80>
ServerName domain.eu
WSGIScriptAlias /first /var/www/first/wsgi

<Directory /var/www/first>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

and

a virtual host in /etc/apache2/sites-available/domain.eu_second

<VirtualHost *:80>
ServerName domain.eu
WSGIScriptAlias /second /var/www/second/wsgi

<Directory /var/www/second>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Now copy your project to first and second. And activate your apache sites by a2ensite domain.eu_first and a2ensite domain.eu_second

You have to proof that you have used only relativ links in your project.

Answer is unverified so just check it out.

Leave a comment