How to Password Protect Web Directories in Apache Using .htaccess File

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

7 Responses

  1. Madhav says:
    Options Indexes Includes FollowSymLinks MultiViews 
    AllowOverride All
    allow,deny
    Allow from all 
    

    I found that in above code the Order word is missing. That is Order allow,deny.

  2. Margarida Brito says:

    Thanks. Much appreciated. Very simple and very easy to follow.
    Just what I needed.

  3. Erick says:

    thanks man, you’ve help me a lot, works nicely on Debian 8

  4. Jelle Langbroek says:

    Hi,
    Thanks for your article.
    I was wondering what the preferred method is for using MySQL instead of htpasswd to store/read passwords. Since Apache2.4 it doesn’t work anymore because of deprecated modules I believe. What’s the best method now?

  5. Aaron Kili K says:

    Thanks for the tutorial, works well on Ubuntu 14.04

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.