Configure protected directories in Apache test failed

Screenshot below shows htpasswd authentication setup correctly and working but status of test was failed. Can someone review and update.

Hi @billsackey

We wanted to keep the default document root to /var/www/html but since you changed it to /var/www/html/itadmins so task failed for you.

This details was missing in the question so we marked your answer as Success.

Dear @Inderpreet,

I had a similar issue as was marked failed. And I think task 3 of the question mentioned it new Doc root so I changed it too.

Hi @andybubune

We have updated the question description now. Your answer is marked as Success. Sorry for this issue.

Hi. Is there something wrong with my .htaccess ?

what is the location of .htaccess file?

/var/www/html/finance is the location

you have to do change a little configuration of main “httpd.conf”. Change it into /var/www/html default document root settings.

will try and let you know.

I think I am doing wrong in /etc/httpd/conf/httpd.conf.
Document Root is by default the same “var/www/html”

I added <Directory “var/www/html/itadmin”>
AllowOverride AuthConfig

Can you please suggest what I am doing wrong?

<Directory “var/www/html/itadmin”>
this step is wrong. wait let me give you useful tutorials link you will get it to setup this whole scenario…
https://www.tecmint.com/password-protect-apache-web-directories-using-htaccess/

this will give you a little help

Still not working. I went through the link but still, I am unable to fix the necessary changes.

[quote=“billsackey, post:1, topic:2268, full:true”]
Screenshot below shows htpasswd authentication setup correctly and working but status of test was failed. Can someone review and update.


[/quote]

can someone guide me what wrong i did ?

Hi @Inderpreet

Can you guide or check what are the wrong step i did!!!
Apache|690x328

@akramw574

We didn’t find the necessary changes in your original answer. Possibly you made the rest of the changes after clicking on Finish button. Please note that any changes made after that are not considered in original answer.