Password protected directory issue

darroosh

Registered
Jan 13, 2018
2
0
1
Egypt
cPanel Access Level
Website Owner
Hi,

I used Cpanel password protected directories to make some directory password protected.

Now when I try to go to the firectory URL, it says ( page not found ).
I opened ( ,htacess) inside this folder and found it containts:

AuthType Basic
AuthName "Blablabla"
AuthUserFile "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd"
require valid-user


When I make the lines in the htaccess file as comment ( hash them), the URL works fine again.

And I went to this path: "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd", to find it's normal containing the username and the encrypted password

What is wrong?
 

24x7server

Well-Known Member
Apr 17, 2013
1,894
91
78
India
cPanel Access Level
Root Administrator
Now when I try to go to the firectory URL, it says ( page not found ).
Please execute the below command on the server and replicate the blank page scenario and check what error is logged on the server. That will be helpful to troubleshoot and advise properly..

# tail -f /usr/local/apache/logs/error_logs
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
797
151
168
New Jersey
cPanel Access Level
DataCenter Provider
Try adding this to the end:

Code:
ErrorDocument 403 default
So it will look like:

Code:
AuthType Basic
AuthName "Blablabla"
AuthUserFile "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd"
require valid-user
ErrorDocument 403 default
 

darroosh

Registered
Jan 13, 2018
2
0
1
Egypt
cPanel Access Level
Website Owner
Please execute the below command on the server and replicate the blank page scenario and check what error is logged on the server. That will be helpful to troubleshoot and advise properly..

# tail -f /usr/local/apache/logs/error_logs
I don't have access to server to execute command
Try adding this to the end:
Code:
ErrorDocument 403 default
So it will look like:

Code:
AuthType Basic
AuthName "Blablabla"
AuthUserFile "/home/direcotrry/.htpasswds/public_html/wp-admin/passwd"
require valid-user
ErrorDocument 403 default
I have added it, But still same result, no change at all.