At present, I get entries such as the following in my php7.0-fpm.log

[11-Sep-2017 13:32:17] WARNING: [pool www] child 28808, script
'/var/www/mysite/public/index.php' (request: "GET /index.php")
executing too slow (91.676235 sec), logging

But instead of just seeing the php script that was executed, I want to see the actual URL for the request. (We direct all PHP requests via index.php so this logging is currently of limited use and requires some hit-or-miss marrying up with the nginx access log.)


The default configuration loads all .conf files from the /usr/local/etc/php-fpm.d/ directory.

Create a new file logging.conf with the following contents:

access.format = "%t \"%m %{REQUEST_URI}e%Q%q\" %s %{mili}d %{kilo}M"

The key is the %{REQUEST_URI}e; this pulls what eventually becomes $_SERVER['REQUEST_URI']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.