2

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?

1 Answer 1

1

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/
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .