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 980523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:23:44+00:00 2026-05-16T04:23:44+00:00

Currently I am having three sites for example let it be site1, site2 and

  • 0

Currently I am having three sites for example let it be site1, site2 and site3 . Each site require authentication. Both site1 and site2 take the same database let it be “Portfolio” database and site3 is having a different database let it be “site3specific” database.

I am planning to have a Common Account database for keeping the login credentials of users for the all different sites available. So that each sites (i.e. site1, site2 and site3) will make use of the Common Account database for authenticating the user login. I am planning to keep the user details in a separate database since all the three sites in development, testing and live environment can share the same user credentials without redundancy. Also each site may have its own specific data that we may be having or entering differently in development, staging and live environments.

Also there is a possibility of sharing some data between sites.

Could anyone please tell me how can I achieve these task in django + Apache + mod_wsgi.

Please advice whether I need to have a globally shared settings file , model file and urls file. IF then how my globally shared settings files need to be modified . Please advice.

  • 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-16T04:23:45+00:00Added an answer on May 16, 2026 at 4:23 am

    This is how we currently operate.

    Each site has its own VirtualHost entry in the httpd.conf, and each app has its own django.wsgi config file which looks something like this (you can probably use a simpler one):

    import os, sys, site, glob
    
    prev_sys_path = list(sys.path) 
    
    root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    site.addsitedir(glob.glob(os.path.join(root_dir, 'venv/lib/python*/site-packages'))[0])
    sys.path.append('/usr/local/django-apps')
    sys.path.append('/usr/local/django-apps/AppName')
    
    new_sys_path = [] 
    for item in list(sys.path): 
        if item not in prev_sys_path: 
            new_sys_path.append(item) 
            sys.path.remove(item) 
    sys.path[:0] = new_sys_path
    
    os.environ['DJANGO_SETTINGS_MODULE'] = 'AppName.settings'
    import django.core.handlers.wsgi
    application = django.core.handlers.wsgi.WSGIHandler()
    

    The VirtualHost needs to contain entries like this:

        SetEnv DJANGO_ENV ${environment
        WSGIDaemonProcess appname user=apache group=apache processes=2 threads=15 display-name=%{GROUP}
        WSGIProcessGroup appname
        WSGIScriptAlias / /usr/local/django-apps/AppName/apache/django.wsgi
        <Directory /usr/local/django-apps/AppName/apache>
                Order deny,allow
        </Directory>
    

    From there, the database set up is dependent on what database engine you’re using.

    Hope this helps.

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

Sidebar

Related Questions

I'm currently adding verbose tooltips to our site, and I'd like (without having to
We're currently having a debate whether it's better to throw faults over a WCF
I'm currently having a major issue with a python script. The script runs arbitrary
I am currently having a hardtime understanding and implementing events in C# using delagates.
I'm currently having a problem with a ShoppingCart for my customer. He wants to
I am currently having some problems with <li> in IE6 essentially my code looks
Hopefully someone can shed a little light on an issue that I'm currently having
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently my workflow with Emacs when I am coding in C or C++ involves

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.