Reputation: 753
So have an ubuntu server with lamp installed. We installed webmin so we would have a gui and we created a virtual host on it. There are three sites we want to host on this host and they are set up as so
myserver.com/site1
myserver.com/site2
myserver.com/site3
On site1 I want to use django which I set up sucessfully with mod_wsgi. But the problem is when I go to any page on the site like site2 or site3 I can see the django splash page on them. I only want django to be effecting the site1 directory not /site2 or /site3. I don't want to use django in site2 or 3.
Is this a problem caused by the way I set up the directives for the virtual host. Which is
<Directory /var/www/site1 >
Order allow,deny
Allow from all
</Directory>
WSGIDaemonProcess site1 processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup site1
WSGIScriptAlias / /var/www/site1/apache/django.wsgi
Upvotes: 0
Views: 487
Reputation: 599570
The WSGIScriptAlias
determines what Django serves. You've set it up to serve /
, the root, so all paths are served by Django. If you only want it to serve /site1
, use that:
WSGIScriptAlias /site1 /var/www/site1/apache/django.wsgi
Upvotes: 2
Reputation: 11
your WSGIScriptAlias (which acts like apache Alias) is mapping '/' site-root (everything) to the django.wsgi script; try WSGIScriptAlias /site1 /var/www/site1/apache/django.wsgi instead
Upvotes: 1