{"id":2177,"date":"2012-10-16T00:52:42","date_gmt":"2012-10-15T23:52:42","guid":{"rendered":"http:\/\/ed.primaryblogger.co.uk\/?p=2177"},"modified":"2012-10-16T00:52:42","modified_gmt":"2012-10-15T23:52:42","slug":"php-fpm-error-logging-to-nginx","status":"publish","type":"post","link":"https:\/\/ed.gs\/2012\/10\/16\/php-fpm-error-logging-to-nginx\/","title":{"rendered":"PHP-FPM Error Logging To Nginx"},"content":{"rendered":"
We’ve finally moved all of our sites, at Primary Technology, over to Nginx\/PHP-FPM from Apache. Our developers had a problem with the error logging that PHP-FPM does by default, as it goes into one file making debugging difficult. You can however log all errors to the Nginx logs as follows.<\/p>\n
php-fpm.conf<\/p>\n
catch_workers_output = yes<\/pre>\nphp.ini<\/p>\n
log_errors = On\nerror_log = /dir/you/want/to/use/for/logging.log<\/pre>\nnginx.conf<\/p>\n
# The final "error" text at the end of the next line is crucial\n# You can also use any of the following in it's place:\n# "debug | info | notice | warn | error | crit | alert | emerg"\n \nerror_log /dir/to/your/nginx/site.log error;<\/pre>\n","protected":false},"excerpt":{"rendered":"We’ve finally moved all of our sites, at Primary Technology, over to Nginx\/PHP-FPM from Apache. Our developers had a problem with the error logging that PHP-FPM does by default, as it goes into one file making debugging difficult. You can however log all errors to the Nginx logs as follows. php-fpm.conf catch_workers_output = yes php.ini […]<\/p>\n","protected":false},"author":2,"featured_media":3525,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[17,41,46,52],"tags":[],"yoast_head":"\n
PHP-FPM Error Logging To Nginx - E<\/title>\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\t\n\t\n\t\n