Nginx + php-fpm not writing php access log although there is configuration option

loggingnginxphp-fpm

I am looking at an nginx server with php-fpm. I see the access.log directive inside the pool configuration /etc/php5/fpm/pool.d/www.conf

; The access log file
; Default: not set
access.log = /var/log/$pool.php.access.log

However the access log file /var/log/www.php.access.log was not created. I created this file manually but still it was not being populated.

The PHP manual does not list an access.log configuration

http://php.net/manual/en/install.fpm.configuration.php

This post says that there is no access log for fastcgit

Is there an access log for fastcgi?

So not sure whether the access.log configuration is even valid. What I would like to see is logging of all requests that pass through from nginx to the php application.

Thanks for your help in advance.

Best Answer

Did you reload php-fpm? It's OK in my mac.

/etc/php-fpm.d/www.conf
access.log = /var/log/www.log

Reload php-fpm

kill -USR2 2233

2233 is php-fpm process id