I found the cause. My server is OpenLiteSpeed with CyberPanel. While the main web server logs in the access.log
file are recorded in the format: %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i
, the logs for individual sites in the /home
directory are written in the format: "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"
(with additional quotation marks at the beginning and end). I have no idea why this is the case – whether it's a feature of OpenLiteSpeed or CyberPanel. The problem is solved. Thanks!