Created
April 28, 2024 19:38
-
-
Save supermarsx/589c13ede11e7c143211aadff85d9b44 to your computer and use it in GitHub Desktop.
PHP FPM conf example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
; Log to stderr | |
error_log = /dev/stderr | |
[www] | |
; The address on which to accept FastCGI requests. | |
; Valid syntaxes are: | |
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on | |
; a specific port; | |
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on | |
; a specific port; | |
; 'port' - to listen on a TCP socket to all addresses | |
; (IPv6 and IPv4-mapped) on a specific port; | |
; '/path/to/unix/socket' - to listen on a unix socket. | |
; Note: This value is mandatory. | |
listen = 127.0.0.1:9000 | |
; Enable status page | |
pm.status_path = /fpm-status | |
; Ondemand process manager | |
pm = ondemand | |
; The number of child processes to be created when pm is set to 'static' and the | |
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. | |
; This value sets the limit on the number of simultaneous requests that will be | |
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. | |
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP | |
; CGI. The below defaults are based on a server without much resources. Don't | |
; forget to tweak pm.* to fit your needs. | |
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' | |
; Note: This value is mandatory. | |
pm.max_children = 100 | |
; The number of seconds after which an idle process will be killed. | |
; Note: Used only when pm is set to 'ondemand' | |
; Default Value: 10s | |
pm.process_idle_timeout = 10s; | |
; The number of requests each child process should execute before respawning. | |
; This can be useful to work around memory leaks in 3rd party libraries. For | |
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. | |
; Default Value: 0 | |
pm.max_requests = 1000 | |
; Make sure the FPM workers can reach the environment variables for configuration | |
clear_env = no | |
; Catch output from PHP | |
catch_workers_output = yes | |
; Remove the 'child 10 said into stderr' prefix in the log and only show the actual message | |
decorate_workers_output = no | |
; Enable ping page to use in healthcheck | |
ping.path = /fpm-ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment