Monday, March 11, 2013

Apache | http authentication

//create passwd file with users
# htpasswd -c /usr/local/etc/users someuser

//to update user
#htpasswd /usr/loca/etc/users someuser

//add this in vhost


                Order deny,allow
                Deny from all
                AuthType Basic
                AuthUserFile /usr/local/etc/users
                AuthName "Login to test environment"
                require valid-user
                Allow from 10.1.1.1
                Satisfy Any

No comments:

Post a Comment