nginx php错误日志开启

1.修改php-fpm.conf中配置 没有则增加

catch_workers_output = yes
error_log = log/error_log

2.修改php.ini中配置,没有则增加
log_errors = On
error_log = "/usr/local/lnmp/php/var/log/error_log"
error_reporting=E_ALL&~E_NOTICE

3.重启php-fpm,
当PHP执行错误时就能看到错误日志在"/usr/local/lnmp/php/var/log/error_log"中了

参考和详细:http://www.cnblogs.com/examine/p/4708303.html

原文地址:https://www.cnblogs.com/lola/p/6429042.html