Task was to create htpasswd file to restrict access to authorized user(s).
- 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”
Please find the attached screnshot for reference.
After completion, task failed with message htpasswd authentication failed.
Please let me know what step went wrong.