1

I'm trying to deny access to a folder for a website that is hosted with OpenLiteSpeed v1.4.2, but I'm have trouble. I take it that .htaccess isn't supported in OpenLiteSpeed so I am unable to just put a .htaccess file with Deny From All in it in the folder.

Let's say the absolute path to the folder I’m trying to hide is /usr/local/lsws/Example/html/hideme. I’ve tried to put the following into the rewrite rules for the virtual host in the OpenLiteSpeed panel but have had no luck:

<Directory ~/hideme>
  Deny from all
</Directory>

<Directory ~/hideme/(.*)$>
  Deny from all
</Directory>

<Directory /usr/local/lsws/Example/html/hideme>
  Deny from all
</Directory>

Does anyone know what I might be doing wrong and how I can deny access to this folder?

Giacomo1968
  • 3,522
  • 25
  • 38
SameOldNick
  • 566
  • 6
  • 23

1 Answers1

0

Looking at this sample config file from a GitHub mirror of the open source repo for OpenLiteSpeed it seems like the config would be something like this:

context {
  uri /hideme/
  accessControl {
    deny 
  }
  location hideme/
}
Giacomo1968
  • 3,522
  • 25
  • 38