CentOS and Apache – password protect with .htaccess and .htpasswd

To protect /stats sub-directory:
Edit /home/.htpasswd file

user:encryptedpassword

Add .htaccess file to /home/usr/usrname/stats/.htaccess

AuthUserFile /home/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require user usrNAMEhere

===

Leave a Reply

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

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">