I've got a Django project which i need mounted at two different subdirectories of my url, and that i need Wordpress running at /. So:

*.example.com - WordPress
*.example.com/studio - django
*.example.com/accounts - django

Here's the httpd.conf which i have to date:

<VirtualHost *:80>
    ServerName wildcard.localhost
    ServerAlias *.localhost

    AddType application/x-httpd-php .php
    DocumentRoot /var/empty

    Alias /site_media/ /home/zach/projects/python/myproject/static/
    Alias /media/ /home/zach/projects/python/myproject/env/lib/python2.6/site-packages/django/contrib/admin/media/
    Alias / /home/zach/projects/python/myproject/wordpress/

    WSGIScriptAlias /accounts /home/zach/projects/python/myproject/app/privio.wsgi
    WSGIScriptAlias /studio /home/zach/projects/python/myproject/app/privio.wsgi

    <Directory /home/zach/projects/python/myproject/app>
    Order allow,deny
    Allow from all
    </Directory>

    <Directory /home/zach/projects/python/myproject/wordpress>
    Order allow,deny
    Allow from all
    </Directory>

Before I added the config for WordPress, the Django application was working fine. However with this new setup I can begin to see the WordPress install at /, however the Django application is not getting offered. I am kind of a noob at Apache config - what shall we be held missing?

Paging Graham Dumpleton :)

I'd venture a reckon that the road

Alias / /home/zach/projects/python/myproject/wordpress/

overrides everything below it. Therefore any demands to /accounts is going to be processed through the wordpress application instead of the Django application.

In the documentation:

Mounting At Cause Of Site

If rather you need to mount a WSGI application at the bottom of the site, simply list '/' because the mount point when setting up the WSGIScriptAlias directive.

WSGIScriptAlias / /usr/local/www/wsgi-scripts/myapp.wsgi

Do note however that doing this means that any static files included in the DocumentRoot is going to be hidden and demands against Web addresses relating towards the static files will rather be processed through the WSGI application.

Replace:

DocumentRoot /var/empty

with:

DocumentRoot /home/zach/projects/python/myproject/wordpress

Remove:

Alias / /home/zach/projects/python/myproject/wordpress/

Replace:

WSGIScriptAlias /accounts /home/zach/projects/python/myproject/app/privio.wsgi
WSGIScriptAlias /studio /home/zach/projects/python/myproject/app/privio.wsgi

with:

WSGIScriptAliasMatch ^(/(accounts|studio)) /home/zach/projects/python/myproject/app/privio.wsgi$1

Quite simply, use DocumentRoot to consult wordpress that should be at cause of site and never Alias directive.

The WSGIScriptAliasMatch is really Django itself thinks it's still mounted at root site despite the fact that only nominated sub Web addresses from it are really passed through. This simplifies things for web addresses.py.

Observe that the $1 at finish of WSGI script path is essential, so don't let it rest off.