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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:11:31+00:00 2026-05-16T12:11:31+00:00

This is a apache/mod_wsgi/virtualenv/django stack. In the virtualenv site-packages dir I’ve got a virtualenv_path_extensions.pth

  • 0

This is a apache/mod_wsgi/virtualenv/django stack. In the virtualenv site-packages dir I’ve got a virtualenv_path_extensions.pth file. The apache conf has a

WSGIScriptAlias / /path/to/my.wsgi

my.wsgi has

site.addsitedir('/path/to/virtualenv/site-packages')

Now, if I start up a python shell, import site, and call the line above, my sys.path looks correct : it has loaded all the paths in the virtualenv_path_extensions.pth

However, Under apache I’m getting 500 errors because it claims django is not on the path. When I log sys.path after the addsitedir line in my.wsgi, it looks as if it has added the first line of virtualenv_path_extensions.pth, but not the rest!

What might cause that?

  • 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-16T12:11:32+00:00Added an answer on May 16, 2026 at 12:11 pm

    Ah, selinux 😀

    The paths that were not getting loaded had the wrong context, and apache wasn’t able to touch them …

    ** must remember to check those selinux logs when mysteries arise **

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

Sidebar

Related Questions

I got my Apache Mod_WSGI and Django working following http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/ with a twist that
I've got a setup with Apache + mod_wsgi running django code, and I'd like
I have a django app runs on Apache with mod_wsgi and my wsgi file
This I'm trying for transfer my current Apache/Modperl site to Starman, and need build
I receive this error when I try to run Apache 2.2 with mod_wsgi, I
I'm serving Django with mod_wsgi and Apache ... unfortunately requests are returning 502 Bad
I have a a django application which is being served from apache/mod_wsgi under www.mysite.com/mysite
I'm using nginx as a reverse proxy to apache/mod_wsgi and Django. Currently everything is
I have set up Django on Windows 7 on Apache/mod_wsgi. I need to stop,
I want to deploy my django app using apache + mod_wsgi again. I seem

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.