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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:09:26+00:00 2026-06-03T17:09:26+00:00

I have a website built using Django on Dreamhost deployed successfully with Passenger and

  • 0

I have a website built using Django on Dreamhost deployed successfully with Passenger and Apache. I have a set of static HTML pages that is being served in a remapped sub-directory called /demo/. By adding a .htaccess file to the /demo/ directory with this line:

PassengerEnabled off

I was able to bypass Django and serve the static pages in the /demo/ directory. I would like to add password protection to the /demo/ pages without editing the Django python files, but was unable to do so by adding the following lines to the .htaccess file (both above and below the PassengerEnabled off line:

AuthUserFile /public/demo/.htpasswd
AuthGroupFile /dev/null
AuthName "Private Demo Area"
AuthType Basic
require valid-user

I am not forced to use the .htaccess file approach and was wondering how do I configure the static file directory to not be processed by Django but also be password protected? Thanks!

  • 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-03T17:09:28+00:00Added an answer on June 3, 2026 at 5:09 pm

    I found a solution which involved creating a subdomain instead of trying to serve the static files through Django and Passenger through a remapped sub-directory. Here is what I did:

    • Created subdomain demo.domain.com in dreamhost web panel
    • Added the .htaccess file to the root directory of the subdomain:

      AuthUserFile /public/demo/.htpasswd
      AuthGroupFile /dev/null
      AuthName “Private Demo Area”
      AuthType Basic
      require valid-user

    That did the trick, but the domain for my demo is now demo.domain.com instead of domain.com/demo/. I am ok with this trade off and this was the only solution I could find on dreamhost shared hosting.

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

Sidebar

Related Questions

I have a website that I built using Django. Using the settings.py file, I
I have built a website using php and simple HTML/CSS for a client. In
I have a production website that, once built in TFS is re-deployed and updated
I have a website built with Django that I would like to combine with
I have a website that is already built using the default aspnet membership provider.
I have a website project that I want to build using CruiseControl.net. On one
I have a website that I built a while ago. All of sudden, without
I have a simple website built using PHP. It is hosted on a Linux
We have a flash website built using flex and CS3. Majority of the site
I have an existing complex website built using ASP.NET MVC, including a database backend,

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.