Website error logs

Hi guys, I am getting use to cyberpanel (new user)

I am confused on errors log.

in the file manager, domain/public_/html/logs the error log is showing 0MB

When i am on dashboard I go to logs/ error logs it shows all of the error logs for that domain there.

How can i fix it where the domain.error_log under the website works instead of the main dashboard?

  1. Go to manage domain and edit vhost and set useServer to 0
    image

  2. You can use FTP/SFTP or SSH as root and change user of the /home/domain/public_html/logs directory from root to the same user as the public_html folder.

  3. Restart litespeed

I will try this ive been battling with this for 3 days

someone told me to set user to 1 and that was it

@sajetek_developer So i changed the ownership and the logs still going to /usr/local/lsws/logs

instead of going to domain/logs

Did you set useServer to 0 and restart openlitespeed?

wI did, i set it to 1 as well to see if it does anything. 0 is set by default.

@shoaibkk said the errors go to the webserver error and not to the domain/logs/error.log

Change logLevel from WARN to WARNING and restart openlitespeed.
It will log in both log files after

errorlog $VH_ROOT/logs/$VH_NAME.error_log {
  useServer               0
  logLevel                WARNING
  rollingSize             10M
  compressArchive         0
}

That did the trick!

Thank you, hopefully they dont go to l/usr/local/lsws/logs anymore

I have created the following script to automatically solve the error_log issue for all domains on CyberPanel/OpenLiteSpeed.
With this script, permissions and log levels are automatically fixed for every site, preventing future issues.

Instructions:

  1. Review and download the script here:
    GitHub - jesussuarz/cyberpanel-errorlog-fixer: Automatic script to fix permissions and update logLevel for error_log files in all CyberPanel OpenLiteSpeed websites. Ensures error logs work and are properly configured.
  2. Follow the steps provided in the repository to run it on your server.

With this approach, the problem is resolved quickly and centrally for all domains.