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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:11:45+00:00 2026-06-09T19:11:45+00:00

I have Django installed on a corporate intranet, running on Apache using mod_wsgi. The

  • 0

I have Django installed on a corporate intranet, running on Apache using mod_wsgi. The Apache server has SSL set up, and everything is working as expected when users hit CGI pages, but my django applications don’t seem to be picking up any SSL related environment variables (ssl_client_s_dn, etc) whether they go to my django pages with http:// or https://.

I think the main issue is that I don’t understand where django is pulling it’s os.environ from, and how to change that. I’ve looked through the official django documentation and other posts on ‘django’ and ‘ssl’, but those seem to deal with views that need to sometimes be http, and sometimes https. I am just trying to get ssl related information to show up in os.environ at all, and I don’t know where to look next.

What do you need to know? httpd.conf wsgi configuration settings? My projects settings.py, or lines in wsgi.py?

Any help is much appreciated.

  • 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-09T19:11:47+00:00Added an answer on June 9, 2026 at 7:11 pm

    If you are using mod_wsgi within Apache, and you set the environment variables in Apache (using SetEnv), then you are out of luck: mod_wsgi‘s environment variables are separate from these in Apache.

    Many people are running into similar problems, when setting variable in Apache using SetEnv is completely invisible when trying to access os.environ in Django.

    There is however some solution. It is listed here, and basically comes to these lines in your wsgi script (adjusted to your needs):

    def application(environ, start_response):
        os.environ['ssl_client_s_dn'] = environ['ssl_client_s_dn']
        return _application(environ, start_response)
    

    Which basically translates first argument of your WSGI application into os.environ dictionary. For details see the post linked above.

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

Sidebar

Related Questions

I have Django running in Apache via mod_wsgi. I believe Django is caching my
I'm working in Django and have installed django-celery. The celery daemon is running on
i have django installed and seems to be working it worked page I want
We installed the django toolbar yesterday on our remote server and have been trying
I have an install of django on apache using embedded wsgi. I DON'T have
I have Django set up under Windows (Win2008 Server R2, IIS 7.5, MS SQL).
I have django installed on my server with pymongo and mongoengine.My django project settings.py
Hello and thank you in advance. I have django installed on Bluehost. Everything seems
I have installed Django, Apache2 and even mod_wsgi. With a project, I have Django
I am using ubuntu and I have installed django from the Ubuntu Software Center.

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.