php-fpm: try to fix hidden error logs
All checks were successful
php-fpm-build / build (7.4) (push) Successful in 4m35s

This commit is contained in:
Elijah Duffy
2025-12-08 02:59:49 -08:00
parent f5d29e3515
commit d98ec294e7
2 changed files with 4 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ RUN set -eux; \
} > /usr/local/etc/php/conf.d/zz-opcache.ini; \
{ \
echo 'expose_php = Off'; \
echo 'display_errors = Off'; \
echo 'display_errors = On'; \
echo 'log_errors = On'; \
echo 'error_log = /proc/self/fd/2'; \
} > /usr/local/etc/php/conf.d/zz-hardening.ini

View File

@@ -45,6 +45,9 @@ slowlog = /var/log/php/www-slow.log
; This ensures that any `echo` or `var_dump` calls from workers are captured in the container logs.
catch_workers_output = yes
; Allow worker processes to write to stderr, which is essential for container logging.
decorate_workers_output = no
; We are logging errors to stderr in zz-hardening.ini, so we can disable the FPM access log
; to avoid redundant logging and improve performance. Nginx should handle access logging.
; access.log = /var/log/php/www-access.log