Posted by & filed under Uncategorized.

Quick notes on configuring password auth via .htaccess:

  • Step 1: Create the directory area and set permissions to read the area
  • Step 2: Create a file called .htaccess in the directory you want to protect
    In that file: 

    AuthUserFile /your/directory/here/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Secure Document"
    AuthType Basic
    require valid-user

  • Step 3: Create a file called .htpasswd in the directory as set in the AuthUserFile directive in the .htaccess file
    You create this file by typing in the information below, at the system prompt, in the directory area to be protected: 

    htpasswd -c .htpasswd username

Leave a Reply

You must be logged in to post a comment.