Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1025495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:56:10+00:00 2026-05-16T11:56:10+00:00

I have a Django project that I need mounted at two different subdirectories of

  • 0

I have a Django project that I need mounted at two different subdirectories of my url, and I need WordPress running at /. So:

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

Here’s the httpd.conf that I have so far:

<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 app was working fine. But with this new setup I am able to see the WordPress install at /, but the Django app isn’t getting served. I’m sort of a noob at Apache config – what am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:56:11+00:00Added an answer on May 16, 2026 at 11:56 am

    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
    

    In other words, use DocumentRoot to refer to wordpress that needs to be at root of site and not Alias directive.

    The WSGIScriptAliasMatch is so Django itself thinks it is still mounted at root site even though only nominated sub URLs of it are actually passed through. This simplifies things for urls.py.

    Note that the $1 at end of WSGI script path is important, so don’t leave it off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a medium sized Django project, (running on AppEngine if it makes any
I have a django project that I have been working on as a solo
I have a django project that uses a sqlite database that can be written
I have a django project in which database values need to be updated fairly
I have a project that I am working on in django. There are a
I have a client's Django project that I'm developing locally, using Mercurial for version
I have successfully created my first django project. I have two apps in my
In my current django project I have a model that stores very long strings
I have an existing Django project that has several models using concrete inheritance of
I have worked a bit with Django and I quite like its project/applications model

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.