+ Reply to Thread
Results 1 to 2 of 2

Thread: Django virtual host setup

  1. #1
    Junior Member
    Join Date
    Jan 2012

    Django virtual host setup

    I am trying to hook up Apache with mod_wsgi. I have used a virtual host to do so. see below:

    <VirtualHost *:80>
    ServerAdmin admin@example.com
    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
    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

  2. #2
    WSGIScriptAlias / /home/mycode/mysite/scripts/django.wsgi
    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.

+ Reply to Thread

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts