Failed: Configure protected directories in Apache

Hi
I used following command and set .htpasswd user and password. but i got task failed.

sudo htpasswd -c /etc/httpd/.htpasswd username

Can you tell me what mistake i made.

@harikrishnan can you please share the error which you are getting. meanwhile there are no issue with command.

Hi @harikrishnan I guess you created the file correctly but , you did not set proper permissions for the file , the file owner should be apache user and it should be able to read the file. Also did you start the httpd service before finishing the task? Try this when the task is assigned again.

Sure. Thanks for update

1 Like