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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:54:21+00:00 2026-06-09T10:54:21+00:00

I have recently set up a web server, which currently hosts a couple of

  • 0

I have recently set up a web server, which currently hosts a couple of static page websites, and two django projects.

the two django projects are ‘abc’ and ‘xyz’ and are in separate directories respectively, in the home folder. Each have their own wsgi script which points to their respective settings.py file.

Recently though, I have been noticing a few 500 errors on ‘xyz’. Usually a refresh will correct the problem, but this isn’t acceptable, so I checked the apache error.log, and noticed that sometimes when I hit ‘xyz’ there is an exception raised about cannot find abc.settings in the xyz project. Somehow these two projects are crossing over and interfering with each other. I have not worked on abc enough yet to know if the problem is the same the other way around. Below is my exception.

[Sun Jul 08 13:30:34 2012] [error] Traceback (most recent call last):
[Sun Jul 08 13:30:34 2012] [error] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Sun Jul 08 13:30:34 2012] [error]    self.load_middleware()
[Sun Jul 08 13:30:34 2012] [error]    File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 39, in load_middleware
[Sun Jul 08 13:30:34 2012] [error]      for middleware_path in settings.MIDDLEWARE_CLASSES:
[Sun Jul 08 13:30:34 2012] [error]    File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 184, in inner
[Sun Jul 08 13:30:34 2012] [error]      self._setup()
[Sun Jul 08 13:30:34 2012] [error]    File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Sun Jul 08 13:30:34 2012] [error]      self._wrapped = Settings(settings_module)
[Sun Jul 08 13:30:34 2012] [error]    File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 95, in __init__
[Sun Jul 08 13:30:34 2012] [error]      raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Sun Jul 08 13:30:34 2012] [error]  ImportError: Could not import settings 'abc.settings' (Is it on sys.path?): No module named scalamoosh.settings

Any help/advice would be greatly appreciated. Cheers

  • 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-06-09T10:54:22+00:00Added an answer on June 9, 2026 at 10:54 am

    The issue you’re running in to is that while mod_wsgi gives each Django app its own python interpreter, they still share the same OS environment which is where Django stores the name of the setting module. The work-around I found was to change the name of the enviroment variable that Django looks for the settings module in before creating the WSGI application object.

    My slightly modified wsgi.py looks something like this:

    import os
    
    # change the env variable where django looks for the settings module
    import django.conf
    django.conf.ENVIRONMENT_VARIABLE = "DJANGO_SECOND_SETTINGS_MODULE"
    
    os.environ.setdefault("DJANGO_SECOND_SETTINGS_MODULE", "second.settings")
    
    # This application object is used by any WSGI server configured to use this
    # file. This includes Django's development server, if the WSGI_APPLICATION
    # setting points here.
    from django.core.wsgi import get_wsgi_application
    application = get_wsgi_application()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a web server running PHP 5.2.13 and have recently been told:
I recently discovered that when you have a page set to session readonly and
I have a rails environment which I set-up with macports. I recently updated macports
I have recently installed and activated APC cache on a web server (Centos 5.7,
We have recently upgraded to IIS7 as a core web server and I need
I recently started using NERDTree with vim, and have set it to automatically open
I have recently merged together 5 of my stand-alone projects into one project to
I have recently had a linux server compromised from bots uploading .php scripts and
I recently upgraded a web server from IIS6 to IIS7 for a classic asp
I have recently purchased some new windows server 2008 boxes all running IIS7. I

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.