mod_auth_basic and mod_authn_file modules need to be loaded in httpd.conf file to make this work.
1) Add location tag (in httpd.conf) which you want to protect with following parameters.
< location /protected >
AuthType basic
AuthName "private area"
AuthBasicProvider file
AuthUserFile /var/authlist
Require valid-user< /location >
2) Create file specified above using following command.
cd /var
htpasswd -c authlist username1
Enter password and confirmation password for username1 which will be stored in authlist file in encrypted format.
3) To add new user use the command.
htpasswd authlist chinni
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJfcnc1ox-k0lboW9t-_iAce6YdPsIGb542TWUQbec8tBfUbUkoSpEIAe6ZWvjIcVUGOtMZOOWPlJOilG-fNAXFhXGTBYHbYRKjQSERKcp8HkIQ1IJp0fC0Q5qY3aL9f9xMKI4ZsVVvg/s1600/save.png)
How to Remove users from Authentication?
To remove user from the open authlist file and remove the userid and password.
Thanks !!!
No comments:
Post a Comment