I am hoping there is a simple answer to my question as I am not the most experienced with python and Apache.
I am trying to hook up Apache with mod_wsgi. I have used a virtual host to do so. see below:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName testserver.com/django
#DocumentRoot /
WSGIScriptAlias / /home/mycode/mysite/scripts/django.wsgi
Alias /media/ /home/mycode/mysite/mysite/media/
Alias /adminmedia/ /opt/python2.7/lib/python2.7/site-packages/django/contrib/admin/media/
<Directory "/home/mycode/mysite/mysite/media">
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
This works great for my django project when I go to testserver.com instead of my php index page I get my django project.
What I am looking for is help with allow my php projects in /var/www/html/ and my django projects to coexist. I am trying to make it so to reach my django project I type testserver.com/django
Any help or guidance is greatly appreciated :)
Thanks!
Change:
WSGIScriptAlias / /home/mycode/mysite/scripts/django.wsgi
to:
WSGIScriptAlias /django /home/mycode/mysite/scripts/django.wsgi
The first argument is the mount point, you have it to be the root of the web server, so just change it to '/django' instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With