January 29, 2010

Apache - аутентификация

FreeBSD# ee /usr/local/etc/apache22/httpd.conf

<Directory "/usr/local/www/apache22/data/test/">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Test Access"
AuthType Basic
AuthUserFile /usr/local/www/apache22/data/test/htpasswd.users
Require valid-user
</Directory>

FreeBSD# /usr/local/sbin/htpasswd -c /usr/local/www/apache22/data/test/htpasswd.users user1
FreeBSD# /usr/local/sbin/htpasswd /usr/local/www/apache22/data/test/htpasswd.users user2
FreeBSD# /usr/local/sbin/htpasswd /usr/local/www/apache22/data/test/htpasswd.users user3

No comments:

Post a Comment