htaccess and htpasswd in Apache server
======================================
Public domain
********************************************************************************
### /etc/httpd/conf/httpd.conf
.
.
AllowOverride All
.
.
********************************************************************************
### /var/www/html/private/.htaccess
AuthUserFile /var/www/html/private/.htpasswd
AuthName "My Private DIR"
AuthType Basic
require valid-user
********************************************************************************
### Add user
Use -c for fist user
# htpasswd -c /var/www/html/private/.htpasswd admin
# chmod 644 /var/www/html/private/.htaccess
# chmod 644 /var/www/html/private/.htpasswd
********************************************************************************
_BY: Pejman Moghadam_
_TAG: htaccess, htpasswd, apache_
_DATE: 2009-04-25 00:21:22_