OpenLiteSpeed is not starting after deleting logs

After fixing mod_security issue as mentioned here with excellent help of @usmannasir, and @shoaibkk, my disk space started to increase and reached 100% from 54% just within 8-9 hours.

After reading few threads, I’ve deleted logs files by running the following command to clear some unwanted space:
rm -rf /usr/local/lsws/logs/*

This helped me to gain some more disk space which is what I wanted, but now, I am unable to start OpenLiteSpeed server nor able to access OpenLiteSpeed WebAdmin at :7080 port.

This is the error that I receive while starting OpenLiteSpeed.

Oct 31 09:02:57 ubuntu20 lswsctrl[31442]: 2021-10-31 09:02:57.418991 [ERROR] [config:server:basics:errorLog] missing <errorLog>
Oct 31 09:02:57 ubuntu20 lswsctrl[31417]: [ERROR] Failed to start litespeed!

I’ve read few threads but didn’t find any solution to this issue. These are the results that I receive when run ls -lah under /usr/local/lsws/logs directory.

drwxr-x---  2 root   nobody  4.0K Oct 31 09:01 .
drwxr-xr-x 26 root   root    4.0K Oct 10 11:38 ..
-rw-r--r--  1 nobody nogroup    0 Oct 31 06:01 access.log
-rw-r--r--  1 root   root       0 Oct 31 09:01 auditmodsec.log
-rw-r--r--  1 nobody nogroup 1.8K Oct 31 06:11 error.log
-rw-r--r--  1 root   root     71K Oct 31 09:12 lsrestart.log
-rw-r--r--  1 nobody nogroup 1.2M Oct 31 06:11 stderr.log

Any help will be much appreciated.

Thanks in advance.

_ CyberPanel is one of the best control panels I’ve used so far._*

Tried upgrading CyberPanel – thought it may fix the issue but no joy :disappointed:

sh <(curl || wget -O -


I’ve managed to fix this myself and would like to share a solution.

Somehow, httpd_config.conf file under /usr/local/lsws/conf was messed up even though I didn’t touch anything related and just deleted the logs folder as explained above. I’ve found that there was a httpd_config.conf.bak file inside that folder so I’ve copied httpd_config.conf.bak file to httpd_config.conf and tried to restart OpenLiteSpeed server which then worked immediately.

Commands I ran:
Let’s first backup httpd_config.conf before copying any contents from httpd_config.conf.bak:

cp /usr/local/lsws/conf/httpd_config.conf /usr/local/lsws/conf/httpd_config.conf.backup

Copy httpd_config.conf.bak to httpd_config.conf:

cp /usr/local/lsws/conf/httpd_config.conf.bak /usr/local/lsws/conf/httpd_config.conf

Restart OpenLiteSpeed server:

systemctl restart lsws

I hope this will help someone having a similar issue.

thank you for sharing your solution, I was not able today.