open httpd.conf file and add folllowing entries.
<Directory "/usr/http/htdocs/active/protect"> (To use your own directory path)
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/usr/http/.htpasswd"
Require valid-user
</Directory>
Then executed following cmd for adding username and password
htpasswd -cm /usr/http/.htpasswd jobin
<Directory "/usr/http/htdocs/active/protect"> (To use your own directory path)
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/usr/http/.htpasswd"
Require valid-user
</Directory>
Then executed following cmd for adding username and password
htpasswd -cm /usr/http/.htpasswd jobin
No comments:
Post a Comment