docker容器中带有php fpm的Nginx不会记录php错误

docker容器中带有php fpm的Nginx不会记录php错误,php,docker,nginx,Php,Docker,Nginx,我正在使用docker设置nginx和phpfpm服务器。还有一个问题,当我在phpnginx中出现错误时,nginx不会在任何地方记录错误 我的项目配置中有这个 project.conf error_log /LOGS/simple_error.log debug; access_log /LOGS/custom_access.log; php_flag[display_errors] = on php_admin_value[error_log] = /var/log/fpm-php.ww

我正在使用
docker
设置
nginx
phpfpm
服务器。还有一个问题,当我在
php
nginx中出现错误时,nginx不会在任何地方记录错误

我的项目配置中有这个

project.conf

error_log /LOGS/simple_error.log debug;
access_log /LOGS/custom_access.log;
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
在access文件中,我可以看到这条通道。这意味着我有一个500状态错误,我不明白为什么

项目错误日志和nginx错误日志都是空的,我不明白为什么

172.17.0.1--[2019年4月5日:11:51:31+0000]“POST/user/create/HTTP/1.1”500 5“-“PostmanRuntime/7.6.1”

172.17.0.1--[2019年4月5日:11:52:20+0000]“POST/user/create/HTTP/1.1”200 58“-“PostmanRuntime/7.6.1”

我在www.conf inside php configuration文件夹中添加了这个,但仍然没有php的错误日志

www.conf

error_log /LOGS/simple_error.log debug;
access_log /LOGS/custom_access.log;
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
/var/log/
目录中有两个目录,但没有我要查找的
php fpm
log`


提前谢谢。

我想服务器日志中会有“为什么”的信息……你被撞到了容器中?我有容器和主机之间共享的
日志
目录。@rajesh为什么nginx不写错误日志?
PHP
错误会用
PHP fpm
记录,因为
nginx
正在代理请求到
php-fpm
。在
nginx
中没有发生错误,因此没有什么可报告的。我猜“为什么”会出现在服务器日志中……你被撞到了容器中?我有容器和主机之间共享的
logs
目录。@rajesh nginx为什么不写错误日志?
PHP
错误会用
PHP fpm
作为日志记录
nginx
正在将请求代理给
php-fpm
。nginx中未发生任何错误,因此无需报告任何内容。