I don’t think Virtualmin sets up php_log, by default? Don’t PHP errors log to the error_log, by default? If that’s the case, Virtualmin wouldn’t setup log rotation for a log it doesn’t configure into existence (it does setup rotation for the logs it configures, including the Apache error_log and access_log for each domain).
I’ve never set logging for php and it has set logs for php into the home dir of the virtual servers. Then we have to setup rotations manually or disable. Can’t see the point of them being on unless needed.
template is on
Ah, I guess FPM does log separately in a default configuration, and that means we should be setting up rotation.
But, weirdly, I’m looking at one of my systems, and rotation does seem to be happening. I’m not sure where, though…I definitely didn’t set it up, but it’s possibly something Ilia set up. I’m looking into it.
This happens because we don’t actually create a log file when setting up PHP logging. This file is used by PHP to write potential errors, therefore on most systems that file won’t exist on its own. We don’t expect that to be a problem for logrotate itself, however Virtualmin validate_logrotate is going to complain.
The solution to this problem is just to create an expect PHP log file when settings things up. I can take a look at this.
@Jamie, also I just discovered that 1. logrotation is not getting set up at all with Nginx, and that 2. with Nginx php_log is not set correctly (not set at all) on domain creation time, even though it’s enabled in the templates.