Reputation: 21
while modify file etc/php-fpm.conf
, if I open the option access.log = log/access.log
, then php-fpm will test error.
➜ sbin ./php-fpm -t
[26-May-2014 17:44:05] ERROR: failed to open access log (log/access.log): No such file or directory (2)
[26-May-2014 17:44:05] ERROR: failed to post process the configuration
[26-May-2014 17:44:05] ERROR: FPM initialization failed
I wonder it is I didn't set correct user and group, or other.
PS.
the error_log write success in var/log/php-fpm.log.
Thanks.
Upvotes: 2
Views: 4862
Reputation: 42915
I have the impression you did not understand the difference between absolute and relative paths!
The file you modified probably is /etc/php-fpm.conf
, not etc/php-fpm.conf
. Note the leading slash (/
), that makes a huge difference. The same things probably raises your issue: where is log/access.log
meant to be located inside the file system? Relative to the processes working directory? Relative to the starting directory of the php interpreter? Where is that? You probably want to use /log/access.log
instead if a folder /log
exists (typical would be /var/log
actually, but that depends on your system and setup). Again: note the leading slash!
Upvotes: 1