FROM php:x.x-fpm COPY ./php.ini /usr/local/etc/php/php.ini COPY ./php-fpm.d/www.conf /usr/local/etc/php-fpm.d/zzz-www.conf
`php.ini``` and `zzz-www.conf```.
I will post the ones that make sense. (Omit the character code)
;Display the error content in the browser when an error occurs(On in development environment) desplay_errors = On ;Enable the setting to spit out error logs log_errors = On ;php error log/var/log/php_error.Settings to spit to log error_log = /var/log/php_error.log ;Value is free ;Memory limit to 256MB memory_limit = 256M ;Maximum value for POST request post_max_size = 128M ;Upload file acceptance limit upload_max_filesize = 64M ;Do not list PHP version in response header expose_php = Off ;SHA session ID hash algorithm-1(160bit)change to session.hash_function = 1 ;Allowable time until forced termination max_execution_time = 30 ;Maximum number of input variables allowed max_input_vars = 1000 ;PHP file tags<?php ?>Only available and restricted(<? ?>Etc. are disabled) short_open_tag = Off ;Time zone date.timezone =TZ you want to set
I referred to this article. Reference article If you refer to a few articles, you can write it by yourself.
The file name is this because I want it to be read after zz-docker.conf so as not to overwrite the listen with the official image `` `zz-docker.conf```, so it doesn't matter if it is read later.
listen = /var/run/php-fpm/php-fpm.sock listen.group = www-data listen.owner = www-data listen.mode = 0666
The first line specifies the position of the socket. (Match with nginx settings)
The 4th line listen.mode should be set to
`0666``` because a permission error will occur if the default `listen.mode = 0660```.
Reference on line 4 I'm addicted to using UNIX domain sockets with Nginx + PHP-FPM.