Hosting your Django app with a PHP app

There might come a time when you need to host a Django and PHP site side by side on a single Linux box (Ubuntu in this case).

After installing your LAMP box simply create a new conf file with the site name such as in sites-enabled.

john@mysite:/etc/apache2/sites-enabled # cat 
WSGIPythonPath /usr/bin/python3 
<VirtualHost *:80> 
    ServerName my_site_url 
    ServerAlias my_site_url
    WSGIScriptAlias / /path/to/django/project/
    Alias /static/ /var/www/html/static/ 
    <Directory /var/www/html/static>
        Require all granted 
    <Directory /path/to/django/project>
            Require all granted
     <Location "/static/">
         Options -Indexes 

Restart Apache server and it should work!

Have fun!

John Roach

John Roach

Westlake, OH, USA