0

I was under the impression from reading the LiteSpeed web server doc, that LiteSpeed was using the same syntax for vhosts config than Apache ones, thus the migration was easy.

However, after installing OpenLiteSpeed and creating vhosts through OpenListeSpeed webUI, I get the following vhost conf file created on my server:

docRoot                   $VH_ROOT
adminEmails               admin@example.com
cgroups                   0

errorlog /www/logs/example.log {
  useServer               0
  logLevel                WARN
}

index  {
  useServer               1
}

It doesn't look like my existing Apache vhost syntax to me. Did I get it wrong?

Can I edit it without the webUI, and how can I add some Apache directives to it? Let's say I want to add this Apache directive to my LiteSpeed vhost, for example:

<Directory "/www/protected">
    AllowOverride All
    Require valid-user
    AuthType Basic
    AuthName "Protected"
    AuthBasicProvider file
    AuthUserFile /www/htpasswd
</Directory>
bolino
  • 273
  • 3
  • 15

1 Answers1

1

LiteSpeed has 2 branches , LiteSpeed Enterprise , which reads Apache conf , and OpenLiteSpeed which is what you see above.

Can I edit it without the webUI, and how can I add some Apache directives to it?

Yes, you can

Let's say I want to add this Apache directive to my LiteSpeed vhost, for example

it will be little hard to write directly the configuration directives on OLS without using webadmin console.

as in your example , it will be something like this

context /protected/{
  required user test
  authName Protected
  allowBrowse 1
  location protected/
  realm SampleProtectedArea

  accessControl {
    deny
    allow *
  }
}

realm SampleProtectedArea {
  userDB {
    cacheTimeout 60
    maxCacheSize 200
    location /path/to/htpasswd
  }

  groupDB {
    cacheTimeout 60
    maxCacheSize 200
    location /path/to/htgroup
  }
}
qtwrk
  • 176
  • 1