I couldn't find a built-in way to set a different PHP error log path for each virtual host. What I've done is set
I can see the correct config setting in the output of PHP info
Now I need to set up rotation for those logs, in case a repeated error ever starts eating up disk space. PHP-FPM accepts a
Is there a better way to have separate PHP logs? If not, can you confirm the correct method of making LSPHP processes switch to their new log files?
PHP_INI_SCAN_DIR=:$VH_ROOT/.local/etc/php.d
in each Environment setting of the LiteSpeed SAPI App Definitions, then put the following in /var/www/user99/.local/etc/php.d/overrides.ini
.
INI:
error_log = /var/www/user99/log/php.log
Now I need to set up rotation for those logs, in case a repeated error ever starts eating up disk space. PHP-FPM accepts a
USR1
signal sent to the process in its .pid
file(s), but I don't know about LSPHP. I can't see any relevant .pid
files on the server, so I guess I have to use killall
, but I don't know what signal to use, if any.Is there a better way to have separate PHP logs? If not, can you confirm the correct method of making LSPHP processes switch to their new log files?