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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:36:48+00:00 2026-05-27T10:36:48+00:00

Is it possible to deploy a Django app on Apache + mod_wsgi ( the

  • 0

Is it possible to deploy a Django app on Apache + mod_wsgi (the standard way) but with HTTP authentication in front of the whole thing?

Basically, I need an extra layer of HTTP security before any user, Django-authenticated or anonymous, is even able to reach the app.

Is this possible? If so, where do the Apache auth directives go?

  • 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-27T10:36:48+00:00Added an answer on May 27, 2026 at 10:36 am

    Yes, it’s possible.

    With mod_wsgi on /, any resources to be provided by apache need to be listed as aliases.

    Auth directives and host restrictions live in Location directives.

    So I’ve disabled any apache access restrictions on things like css, and provided host/ip based access to another directory.

    <VirtualHost *:80>
            Servername              app.domain.example
            CustomLog               logs/access_log combined
            ErrorLog                logs/error_log
            DocumentRoot            "/home/app/apache/app/html"
    
            Alias /media/           /home/app/apache/app/html/media/
    
            <Location />
                    Options None
                    AuthType                Basic
                    AuthName                "Login Prompt"
                    AuthUserFile            /path/to/passwd.file
                    Require                 valid-user
            </Location>
    
            <Location /media>
                    Order allow,deny
                    Allow from all
                    Satisfy any
            </Location>
    
            WSGIDaemonProcess       app user=app group=app processes=5 threads=1 display-name=app_WSGI
            WSGIProcessGroup        app
            WSGIScriptAlias         /       /home/app/apache/app.wsgi
    </VirtualHost>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible in django/apache to deploy parts of the django app in one
Is it possible to deploy an Android application to the google app engine environment?
Is it possible to deploy an application to a GlassFish app server that would
Is it possible to eliminate the desktop and fully code and deploy a python/django
Is it possible to deploy the apache mahout recommendation algorithm with their csv,txt or
Is it possible to deploy a website using git push ? I have a
I want to build projects from the command line. Is it possible to deploy
I'm a Drupal newbie. Is it possible to set up everything and deploy Drupal
Possible Duplicate: .NET - What’s the best way to implement a catch all exceptions
Possible Duplicate: How do you send email from a Java app using Gmail? How

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.