htpasswd authentication

Discussion in 'Apache Migration/Compatibility' started by Checkmate, Oct 1, 2014.

  1. Checkmate

    Checkmate New Member

    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?
     
  2. NiteWave

    NiteWave Administrator

    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
     
  3. gremlintv2

    gremlintv2 New Member

    Hi, say please, where i need to enable .htaccess config in LS? It only need to be present in root folder?
     
  4. NiteWave

    NiteWave Administrator

Share This Page