• Support
  • If I enable OLS panel the web server stops working

I´m trying to make OpenLiteSpeed read my .htaccess file. I tried many things like enable rewrite in the config file and point it to the actual htaccess file

rewrite {
  enable 1
   rules                   <<<END_rules
rewriteFile           /usr/local/lsws/Example/html/.htaccess
  END_rules
  logLevel 0
}

But it doesn´t work.
I tried the trick to comment these 2 lines in the OLS config file

include /www/server/panel/vhost/openlitespeed/*.conf
include /www/server/panel/vhost/openlitespeed/listen/*.conf

Of course that enables the write mode, but my sites automatically stop working. Remove the "#" and everything works again.
BTW that "example" virtual host is the default one, should I create another one?
Any clues what could I be doing wrong?
Thanks in advance.

UPDATE: I managed to edit via OLS panel and include these security headers

But they still won´t get recognized, which make me think aapanel is not taking this config file into account.
Is there any other file where I can add these kind of headers? Thanks.

im used to apache but recently switched to OLS -- from what i gather you need to restart the OLS service for the htaccess changes to work?

That´s right, only enterprise version reads the htaccess directly. But in this case I couldn´t even make it work.
Anyway I found a workaround to control both expire headers and security headers via CloudFlare workers.
UPDATE: CLoudflare workers are free but with a limite... I learned it the hard way losing many visitors for 2 hours. So beware.