htpasswd doesn't work!

#1
I just migrated from Apache + Nginx and setup virtual host.
All configuration work with Apache, but LiteSpeed does not ask password.

File permissions and chmod are correct and located in $VH_HOME/.htpasswd and $VH_HOME/.htaccess
-rw-r--r-- 1 nobody nobody 122 Jun 4 19:58 .htaccess
-rw-r--r-- 1 nobody nobody 260 Jun 4 19:45 .htpasswd

AuthType Basic
AuthName "Restricted Content"
AuthUserFile /home/user/.htpasswd
Require valid-user


Nothing, after open /index.php it's never ask for password.

I tried another way with Realm and it's worked with my passwd file BUT login/password did not accepted every time.

I checked this method to create new login/password
https://openlitespeed.org/kb/user-authentication-through-realms/

But in my Virtual Hosts - Security
tab Password File Realm Definition does not exist! How I can generate htpasswd file in Web UI, if standard Apache-generated file does not fit?

Both methods don't work and I don't know what to do. I have been using search for more than 3 hours, but none of the methods works.
On any other web server this simple step takes 2 minutes.

Please help me to do this!

LiteSpeed/1.6.21 Open
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
(built: Tue Apr 6 13:20:57 UTC 2021)
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
 
#2
I was able to got it working only when regenerate htaccess in crypt() algorithm.

The problem that your User Manual contains some instructions that do not working - htpasswd command cannot create right syntax file for LiteSpeed.

tab Password File Realm Definition does not exist in UI

and

without many manipulations in UI, LiteSpeed does not see .htpasswd automatically.
 

Pong

Administrator
Staff member
#3
Glad you figured out. which OLS User Manual do you refer to? By the way, this is forum for LiteSpeed Enterprise, for OLS better to use https://forum.openlitespeed.org/. OLS doesn't support apache directives in .htaccess such as AuthType etc, Only LSWS supports them.
 
Top