0

I have CentOS 7 with apache 2.4.35 with pmp event and php-fpm

all works fine but all php errors are go to one big file for all my virtual hosts.

I read all docs about it and find that

catch_workers_output = yes

might be help me. I think that this directive send all php errors to apache log file but there is no luck.

I don't really know what I should now.

here is my php.conf

<Proxy "unix:/var/run/php-fpm/default.sock|fcgi://php-fpm">
 # we must declare a parameter in here (doesn't matter which) or it'll not register the proxy ahead of time
 ProxySet disablereuse=off
</Proxy>
# Redirect to the proxy
<FilesMatch \.php$>
    SetHandler proxy:fcgi://php-fpm
</FilesMatch>

#
# Allow php to handle Multiviews
#
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

ProxyErrorOverride on

p.s. I think that individual pool per site will solve the problem but I think that it get really more memory, because every pool need to create empty slots to start serving...

0

I found that if I comment out this line in file /etc/php-fpm.d/www.conf

php_admin_value[error_log] = /var/log/php-fpm/www-error.log

like here:

;php_admin_value[error_log] = /var/log/php-fpm/www-error.log

all php errors go to the apache log files (individual per site)

There is no need to touch catch_workers_output . Leave it commented out!

;catch_workers_output = no

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.