mmeisson
mmeisson

Reputation: 673

php-fpm configuration : unknown entry 'access.log'

I'm trying to setting up two service with php-fpm / nginx on two separates containers ( back service, as an API / front service where static files are built with a bit of php ). It's a small school project I'm building with tools that I don't know, just to learn.

I'm actually trying to touch php-fpm configuration, so I created a directory near the existing one where I store my test. This directory is included, no problem, but when I try to set an access.log key, even it is copy pasted from an other file already included that works, I receive the message ' unknown entry 'access.log'' .

[global]

; logging files

error_log = /var/php-fpm/log/error.log

access.log = log/$pool.access.log

slowlog = /var/php-fpm/log/slow.log

request_slowlog_timeout = 2s request_slowlog_trace_depth = 200

request_terminate_timeout = 20

security.limit_extensions = .php

; !important

listen = /var/run/php5-fpm.sock

Can someone tell me where I am wrong ?

Upvotes: 3

Views: 4559

Answers (2)

Kim
Kim

Reputation: 51

In your example you have the access.log setting under the [global] block

From the docs the access.log is a pool level config option.

https://www.php.net/manual/en/install.fpm.configuration.php

Your example config would be something like


[global]

error_log = /var/php-fpm/log/error.log

 ...

[www]

access.log = log/$pool.access.log

Upvotes: 5

Manel
Manel

Reputation: 1654

Try to rename access.log to access_log

Your exemple file looks like an nginx configuration file.

Access logging is made in nginx with

access_log /var/log/nginx/access.log;

Upvotes: 0

Related Questions