PHP-FPM doesn't write to error log

前端 未结 11 1112
予麋鹿
予麋鹿 2020-11-27 09:12

I\'ve just installed a nginx+php-fpm server. Everything seems fine except that PHP-FPM never writes error to its log.

fpm.conf

[default]
listen = /va         


        
11条回答
  •  被撕碎了的回忆
    2020-11-27 10:04

    I had a similar issue and had to do the following to the pool.d/www.conf file

    php_admin_value[error_log] = /var/log/fpm-php.www.log
    php_admin_flag[log_errors] = on
    

    It still wasn't writing the log file so I actually had to create it by touch /var/log/fpm-php.www.log then setting the correct owner sudo chown www-data:www-data /var/log/fpm-php.www.log.

    Once this was done, and php5-fpm restarted, logging was resumed.

提交回复
热议问题