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

  • Home
  • SEARCH
  • 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 6931959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:38:41+00:00 2026-05-27T11:38:41+00:00

I’ve got a bit of a problem with forcing django based site and a

  • 0

I’ve got a bit of a problem with forcing django based site and a “regular” sites i.e. wikis to work on the same machine, and to top it I’m kinda new to this stuff…

I’ve been trying to setup this using the VirtualHost but it seems that this does not work very well. In other words I can either run the django site (alredy in form of host.com/djangosite) and other sites in the same time (i.e host.com/othersite1). Only one works at a time it looks like the apache runs first VirtualHost it finds.

the structure in the server looks like this

/var/www/djangosite
/var/www/othersite1
/var/www/othersite2 ... etc

Now the sites-enabled, I experimented a bit and finally ended up in one file with two VirtualHosts for now:

    <VirtualHost *:80>
        ServerAdmin ss@dd.gg
        DocumentRoot /var/www/djangosite
        ServerName host.com/djangosite

        Alias /m/ "/var/www/djangosite/forum/skins/"
        <Directory "/var/www/djangosite/forum/skins">
                Order allow,deny
                Allow from all
        </Directory>
        Alias /upfiles/ "/var/www/djangosite/forum/upfiles/"
        <Directory "/var/www/djangosite/forum/upfiles">
                Order deny,allow
                Allow from all
        </Directory>

        WSGIScriptAlias /djangosite /var/www/djangosite/djangosite.wsgi

        CustomLog /var/log/djangosite.access.log common
        ErrorLog /var/log/djangosite.error.log
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot /var/www/othersite1
        ServerName host.com/othersite1
</VirtualHost>

On their own both VirtualHosts do ok, i.e. when I put this in a file in sites-enabled the djangosite works fine, the second is not found, (something with document root being rooted at wrong dir in filesystem structure). If I put the second Vhost on top it works the djangosite doesn’t.

Ok. so now a real question is there a recipe for running djangosite and “regular” site on one linux/apache configuration with one NIC and one hostname.

thanks for at least reading 🙂

  • 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-27T11:38:42+00:00Added an answer on May 27, 2026 at 11:38 am

    You don’t need two seperate VirtualHosts. Just put them both in the same one, with the ServerName as just “host.com”. Then you can use aliases – the WSGIScriptAlias for the Django site, and a normal Alias for the wiki.

    One note: please do not put your Django code in the DocumentRoot. This is dangerous – it makes it potentially possible for people to see your code, including your passwords etc in settings.py. Move it somewhere else, and leave out the DocumentRoot directive.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
i got an object with contents of html markup in it, for example: string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have just tried to save a simple *.rtf file with some websites and

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.