htpasswd authentication

#1
Hi

I'm using cpanel with litespeed. I have a private folder: /private/ that need to be passworded via htaccess / htpassword.

Code:
AuthType Basic
AuthName "Authorized Only"
AuthUserFile "/home/user/.htpasswds/public_html/private/passwd"

require valid-user
The authentication is prompted when I access /private/. However, the authentication is not prompted if I access /private/index.php

How do I force index.php to go through the auth as well?
 

NiteWave

Administrator
#2
I did local tests, it should be working fine.
did you put above code in /home/user/public_html/.htaccess ?

another case is, if you have accessed /private/ first, and input the user name / password, browser will remember them, when you visit /private/index.php, it won't prompt you username/password again.

and to be sure you're running latest lsws 4.2.16. to be sure, do force-install the latest version:
in command line:
#/usr/local/lsws/admin/misc/lsup.sh -f -v 4.2.16
 
Top