"Virtual Host Log": turning off "Use Server's Log" doesn't work

Fonant

New Member
#1
I'd like to log PHP errors separately for each Virtual Host, the same as access logs are.

VHost Template, Log tab settings:

User Server's Log: No
File Name: $VH_ROOT/logs/error_log
Log Level: NOTICE

But setting "Use Server's Log" to "No" has no effect: PHP errors are still logged to the main error log file.

Is this a bug?
 

Fonant

New Member
#3
Yes it exists, owned by "apache", which is the user I have openlitespeed running as (both the openlitespeed and the lsphp processes are running as apache).

The requested VirtualHost error log is zero bytes in size, and PHP errors are being logged in the main /usr/local/lsws/logs/stderr.log file.

Running using a VHost template. Perhaps this only works for instantiated Virtual Hosts?
 

Cold-Egg

Administrator
#4
Oh, you are using Vhost template, then I am not sure about this, maybe it's a bug. You can try the instantiated Virtual Hosts and see if it helps.
 

Fonant

New Member
#5
Hmmm... instantiating the VirtualHost didn't help. There's something else going on.

Sites under one VHost template are in fact logging to their own error logs. But sites under another, using a different PHP version, aren't. Must be some difference in configuration, or a difference between logging behaviour between PHP 7.4 and PHP 8.1.
 
Top