Hi Team,
Background:
Task was to create htpasswd file to restrict access to authorized user(s).
Steps Followed:
- As mentioned created sysops directory under /var/www/html.
- Created .htpasswd for user mariyan
#sudo htpasswd -c /var/www/html/.htpasswd mariyan - Creted .htaccess file
#sudo vi .htaccess
AuthName “Restricted Site”
AuthType Basic
AuthUserFile /var/www/html/.htpasswd
Require valid-user
Please find the attached screnshot for reference.
After completion, task failed with message htpasswd authentication failed.
Please let me know what step went wrong.
Thank You.