http://www.perlmonks.org?node_id=197400


in reply to .htaccess file

I think you are missing some things in your .htaccess. Here's how it's supposed to look like:

AuthName        "this is neat"
AuthType        Basic
AuthUserFile    /usr/www/users/tstock/.htpasswd

<Limit GET POST>
require valid-user
</Limit>

Note the AuthUserFile points to a .htpasswd, not .htaccess, and that the path is a file path, not a URL.

To create your .htpasswd file, use the command `htpasswd -c .htpasswd username_here` from the shell. The -c flag is only needed for the first user.

tstock