c32844
; Start a new pool named 'www'.
c32844
; the variable $pool can be used in any directive and will be replaced by the
c32844
; pool name ('www' here)
c32844
[www]
c32844
c32844
; Per pool prefix
c32844
; It only applies on the following directives:
c32844
; - 'access.log'
c32844
; - 'slowlog'
c32844
; - 'listen' (unixsocket)
c32844
; - 'chroot'
c32844
; - 'chdir'
c32844
; - 'php_values'
c32844
; - 'php_admin_values'
c32844
; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
c32844
; Note: This directive can also be relative to the global prefix.
c32844
; Default Value: none
c32844
;prefix = /path/to/pools/$pool
c32844
c32844
; Unix user/group of processes
c32844
; Note: The user is mandatory. If the group is not set, the default user's group
c32844
;       will be used.
c32844
; RPM: apache user chosen to provide access to the same directories as httpd
c32844
user = apache
c32844
; RPM: Keep a group allowed to write in log dir.
c32844
group = apache
c32844
c32844
; The address on which to accept FastCGI requests.
c32844
; Valid syntaxes are:
c32844
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
c32844
;                            a specific port;
c32844
;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
c32844
;                            a specific port;
c32844
;   'port'                 - to listen on a TCP socket to all addresses
c32844
;                            (IPv6 and IPv4-mapped) on a specific port;
c32844
;   '/path/to/unix/socket' - to listen on a unix socket.
c32844
; Note: This value is mandatory.
c32844
listen = /run/php-fpm/www.sock
c32844
c32844
; Set listen(2) backlog.
c32844
; Default Value: 511
c32844
;listen.backlog = 511
c32844
c32844
; Set permissions for unix socket, if one is used. In Linux, read/write
c32844
; permissions must be set in order to allow connections from a web server.
c32844
; Default Values: user and group are set as the running user
c32844
;                 mode is set to 0660
c32844
;listen.owner = nobody
c32844
;listen.group = nobody
c32844
;listen.mode = 0660
c32844
c32844
; When POSIX Access Control Lists are supported you can set them using
c32844
; these options, value is a comma separated list of user/group names.
c32844
; When set, listen.owner and listen.group are ignored
c32844
listen.acl_users = apache,nginx
c32844
;listen.acl_groups =
c32844
c32844
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
c32844
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
c32844
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
c32844
; must be separated by a comma. If this value is left blank, connections will be
c32844
; accepted from any ip address.
c32844
; Default Value: any
c32844
listen.allowed_clients = 127.0.0.1
c32844
c32844
; Specify the nice(2) priority to apply to the pool processes (only if set)
c32844
; The value can vary from -19 (highest priority) to 20 (lower priority)
c32844
; Note: - It will only work if the FPM master process is launched as root
c32844
;       - The pool processes will inherit the master process priority
c32844
;         unless it specified otherwise
c32844
; Default Value: no set
c32844
; process.priority = -19
c32844
c32844
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
c32844
; or group is differrent than the master process user. It allows to create process
c32844
; core dump and ptrace the process for the pool user.
c32844
; Default Value: no
c32844
; process.dumpable = yes
c32844
c32844
; Choose how the process manager will control the number of child processes.
c32844
; Possible Values:
c32844
;   static  - a fixed number (pm.max_children) of child processes;
c32844
;   dynamic - the number of child processes are set dynamically based on the
c32844
;             following directives. With this process management, there will be
c32844
;             always at least 1 children.
c32844
;             pm.max_children      - the maximum number of children that can
c32844
;                                    be alive at the same time.
c32844
;             pm.start_servers     - the number of children created on startup.
c32844
;             pm.min_spare_servers - the minimum number of children in 'idle'
c32844
;                                    state (waiting to process). If the number
c32844
;                                    of 'idle' processes is less than this
c32844
;                                    number then some children will be created.
c32844
;             pm.max_spare_servers - the maximum number of children in 'idle'
c32844
;                                    state (waiting to process). If the number
c32844
;                                    of 'idle' processes is greater than this
c32844
;                                    number then some children will be killed.
c32844
;  ondemand - no children are created at startup. Children will be forked when
c32844
;             new requests will connect. The following parameter are used:
c32844
;             pm.max_children           - the maximum number of children that
c32844
;                                         can be alive at the same time.
c32844
;             pm.process_idle_timeout   - The number of seconds after which
c32844
;                                         an idle process will be killed.
c32844
; Note: This value is mandatory.
c32844
pm = dynamic
c32844
c32844
; The number of child processes to be created when pm is set to 'static' and the
c32844
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
c32844
; This value sets the limit on the number of simultaneous requests that will be
c32844
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
c32844
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
c32844
; CGI. The below defaults are based on a server without much resources. Don't
c32844
; forget to tweak pm.* to fit your needs.
c32844
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
c32844
; Note: This value is mandatory.
c32844
pm.max_children = 50
c32844
c32844
; The number of child processes created on startup.
c32844
; Note: Used only when pm is set to 'dynamic'
c32844
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
c32844
pm.start_servers = 5
c32844
c32844
; The desired minimum number of idle server processes.
c32844
; Note: Used only when pm is set to 'dynamic'
c32844
; Note: Mandatory when pm is set to 'dynamic'
c32844
pm.min_spare_servers = 5
c32844
c32844
; The desired maximum number of idle server processes.
c32844
; Note: Used only when pm is set to 'dynamic'
c32844
; Note: Mandatory when pm is set to 'dynamic'
c32844
pm.max_spare_servers = 35
c32844
c32844
; The number of seconds after which an idle process will be killed.
c32844
; Note: Used only when pm is set to 'ondemand'
c32844
; Default Value: 10s
c32844
;pm.process_idle_timeout = 10s;
c32844
c32844
; The number of requests each child process should execute before respawning.
c32844
; This can be useful to work around memory leaks in 3rd party libraries. For
c32844
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
c32844
; Default Value: 0
c32844
;pm.max_requests = 500
c32844
c32844
; The URI to view the FPM status page. If this value is not set, no URI will be
c32844
; recognized as a status page. It shows the following informations:
c32844
;   pool                 - the name of the pool;
c32844
;   process manager      - static, dynamic or ondemand;
c32844
;   start time           - the date and time FPM has started;
c32844
;   start since          - number of seconds since FPM has started;
c32844
;   accepted conn        - the number of request accepted by the pool;
c32844
;   listen queue         - the number of request in the queue of pending
c32844
;                          connections (see backlog in listen(2));
c32844
;   max listen queue     - the maximum number of requests in the queue
c32844
;                          of pending connections since FPM has started;
c32844
;   listen queue len     - the size of the socket queue of pending connections;
c32844
;   idle processes       - the number of idle processes;
c32844
;   active processes     - the number of active processes;
c32844
;   total processes      - the number of idle + active processes;
c32844
;   max active processes - the maximum number of active processes since FPM
c32844
;                          has started;
c32844
;   max children reached - number of times, the process limit has been reached,
c32844
;                          when pm tries to start more children (works only for
c32844
;                          pm 'dynamic' and 'ondemand');
c32844
; Value are updated in real time.
c32844
; Example output:
c32844
;   pool:                 www
c32844
;   process manager:      static
c32844
;   start time:           01/Jul/2011:17:53:49 +0200
c32844
;   start since:          62636
c32844
;   accepted conn:        190460
c32844
;   listen queue:         0
c32844
;   max listen queue:     1
c32844
;   listen queue len:     42
c32844
;   idle processes:       4
c32844
;   active processes:     11
c32844
;   total processes:      15
c32844
;   max active processes: 12
c32844
;   max children reached: 0
c32844
;
c32844
; By default the status page output is formatted as text/plain. Passing either
c32844
; 'html', 'xml' or 'json' in the query string will return the corresponding
c32844
; output syntax. Example:
c32844
;   http://www.foo.bar/status
c32844
;   http://www.foo.bar/status?json
c32844
;   http://www.foo.bar/status?html
c32844
;   http://www.foo.bar/status?xml
c32844
;
c32844
; By default the status page only outputs short status. Passing 'full' in the
c32844
; query string will also return status for each pool process.
c32844
; Example:
c32844
;   http://www.foo.bar/status?full
c32844
;   http://www.foo.bar/status?json&full
c32844
;   http://www.foo.bar/status?html&full
c32844
;   http://www.foo.bar/status?xml&full
c32844
; The Full status returns for each process:
c32844
;   pid                  - the PID of the process;
c32844
;   state                - the state of the process (Idle, Running, ...);
c32844
;   start time           - the date and time the process has started;
c32844
;   start since          - the number of seconds since the process has started;
c32844
;   requests             - the number of requests the process has served;
c32844
;   request duration     - the duration in ┬Ás of the requests;
c32844
;   request method       - the request method (GET, POST, ...);
c32844
;   request URI          - the request URI with the query string;
c32844
;   content length       - the content length of the request (only with POST);
c32844
;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
c32844
;   script               - the main script called (or '-' if not set);
c32844
;   last request cpu     - the %cpu the last request consumed
c32844
;                          it's always 0 if the process is not in Idle state
c32844
;                          because CPU calculation is done when the request
c32844
;                          processing has terminated;
c32844
;   last request memory  - the max amount of memory the last request consumed
c32844
;                          it's always 0 if the process is not in Idle state
c32844
;                          because memory calculation is done when the request
c32844
;                          processing has terminated;
c32844
; If the process is in Idle state, then informations are related to the
c32844
; last request the process has served. Otherwise informations are related to
c32844
; the current request being served.
c32844
; Example output:
c32844
;   ************************
c32844
;   pid:                  31330
c32844
;   state:                Running
c32844
;   start time:           01/Jul/2011:17:53:49 +0200
c32844
;   start since:          63087
c32844
;   requests:             12808
c32844
;   request duration:     1250261
c32844
;   request method:       GET
c32844
;   request URI:          /test_mem.php?N=10000
c32844
;   content length:       0
c32844
;   user:                 -
c32844
;   script:               /home/fat/web/docs/php/test_mem.php
c32844
;   last request cpu:     0.00
c32844
;   last request memory:  0
c32844
;
c32844
; Note: There is a real-time FPM status monitoring sample web page available
c32844
;       It's available in: @EXPANDED_DATADIR@/fpm/status.html
c32844
;
c32844
; Note: The value must start with a leading slash (/). The value can be
c32844
;       anything, but it may not be a good idea to use the .php extension or it
c32844
;       may conflict with a real PHP file.
c32844
; Default Value: not set
c32844
;pm.status_path = /status
c32844
c32844
; The ping URI to call the monitoring page of FPM. If this value is not set, no
c32844
; URI will be recognized as a ping page. This could be used to test from outside
c32844
; that FPM is alive and responding, or to
c32844
; - create a graph of FPM availability (rrd or such);
c32844
; - remove a server from a group if it is not responding (load balancing);
c32844
; - trigger alerts for the operating team (24/7).
c32844
; Note: The value must start with a leading slash (/). The value can be
c32844
;       anything, but it may not be a good idea to use the .php extension or it
c32844
;       may conflict with a real PHP file.
c32844
; Default Value: not set
c32844
;ping.path = /ping
c32844
c32844
; This directive may be used to customize the response of a ping request. The
c32844
; response is formatted as text/plain with a 200 response code.
c32844
; Default Value: pong
c32844
;ping.response = pong
c32844
c32844
; The access log file
c32844
; Default: not set
c32844
;access.log = log/$pool.access.log
c32844
c32844
; The access log format.
c32844
; The following syntax is allowed
c32844
;  %%: the '%' character
c32844
;  %C: %CPU used by the request
c32844
;      it can accept the following format:
c32844
;      - %{user}C for user CPU only
c32844
;      - %{system}C for system CPU only
c32844
;      - %{total}C  for user + system CPU (default)
c32844
;  %d: time taken to serve the request
c32844
;      it can accept the following format:
c32844
;      - %{seconds}d (default)
c32844
;      - %{miliseconds}d
c32844
;      - %{mili}d
c32844
;      - %{microseconds}d
c32844
;      - %{micro}d
c32844
;  %e: an environment variable (same as $_ENV or $_SERVER)
c32844
;      it must be associated with embraces to specify the name of the env
c32844
;      variable. Some exemples:
c32844
;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
c32844
;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
c32844
;  %f: script filename
c32844
;  %l: content-length of the request (for POST request only)
c32844
;  %m: request method
c32844
;  %M: peak of memory allocated by PHP
c32844
;      it can accept the following format:
c32844
;      - %{bytes}M (default)
c32844
;      - %{kilobytes}M
c32844
;      - %{kilo}M
c32844
;      - %{megabytes}M
c32844
;      - %{mega}M
c32844
;  %n: pool name
c32844
;  %o: output header
c32844
;      it must be associated with embraces to specify the name of the header:
c32844
;      - %{Content-Type}o
c32844
;      - %{X-Powered-By}o
c32844
;      - %{Transfert-Encoding}o
c32844
;      - ....
c32844
;  %p: PID of the child that serviced the request
c32844
;  %P: PID of the parent of the child that serviced the request
c32844
;  %q: the query string
c32844
;  %Q: the '?' character if query string exists
c32844
;  %r: the request URI (without the query string, see %q and %Q)
c32844
;  %R: remote IP address
c32844
;  %s: status (response code)
c32844
;  %t: server time the request was received
c32844
;      it can accept a strftime(3) format:
c32844
;      %d/%b/%Y:%H:%M:%S %z (default)
c32844
;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
c32844
;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
c32844
;  %T: time the log has been written (the request has finished)
c32844
;      it can accept a strftime(3) format:
c32844
;      %d/%b/%Y:%H:%M:%S %z (default)
c32844
;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
c32844
;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
c32844
;  %u: remote user
c32844
;
c32844
; Default: "%R - %u %t \"%m %r\" %s"
c32844
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
c32844
c32844
; The log file for slow requests
c32844
; Default Value: not set
c32844
; Note: slowlog is mandatory if request_slowlog_timeout is set
c32844
slowlog = /var/log/php-fpm/www-slow.log
c32844
c32844
; The timeout for serving a single request after which a PHP backtrace will be
c32844
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
c32844
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
c32844
; Default Value: 0
c32844
;request_slowlog_timeout = 0
c32844
c32844
; Depth of slow log stack trace.
c32844
; Default Value: 20
c32844
;request_slowlog_trace_depth = 20
c32844
c32844
; The timeout for serving a single request after which the worker process will
c32844
; be killed. This option should be used when the 'max_execution_time' ini option
c32844
; does not stop script execution for some reason. A value of '0' means 'off'.
c32844
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
c32844
; Default Value: 0
c32844
;request_terminate_timeout = 0
c32844
c32844
; Set open file descriptor rlimit.
c32844
; Default Value: system defined value
c32844
;rlimit_files = 1024
c32844
c32844
; Set max core size rlimit.
c32844
; Possible Values: 'unlimited' or an integer greater or equal to 0
c32844
; Default Value: system defined value
c32844
;rlimit_core = 0
c32844
c32844
; Chroot to this directory at the start. This value must be defined as an
c32844
; absolute path. When this value is not set, chroot is not used.
c32844
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
c32844
; of its subdirectories. If the pool prefix is not set, the global prefix
c32844
; will be used instead.
c32844
; Note: chrooting is a great security feature and should be used whenever
c32844
;       possible. However, all PHP paths will be relative to the chroot
c32844
;       (error_log, sessions.save_path, ...).
c32844
; Default Value: not set
c32844
;chroot =
c32844
c32844
; Chdir to this directory at the start.
c32844
; Note: relative path can be used.
c32844
; Default Value: current directory or / when chroot
c32844
;chdir = /var/www
c32844
c32844
; Redirect worker stdout and stderr into main error log. If not set, stdout and
c32844
; stderr will be redirected to /dev/null according to FastCGI specs.
c32844
; Note: on highloaded environement, this can cause some delay in the page
c32844
; process time (several ms).
c32844
; Default Value: no
c32844
;catch_workers_output = yes
c32844
c32844
; Clear environment in FPM workers
c32844
; Prevents arbitrary environment variables from reaching FPM worker processes
c32844
; by clearing the environment in workers before env vars specified in this
c32844
; pool configuration are added.
c32844
; Setting to "no" will make all environment variables available to PHP code
c32844
; via getenv(), $_ENV and $_SERVER.
c32844
; Default Value: yes
c32844
;clear_env = no
c32844
c32844
; Limits the extensions of the main script FPM will allow to parse. This can
c32844
; prevent configuration mistakes on the web server side. You should only limit
c32844
; FPM to .php extensions to prevent malicious users to use other extensions to
c32844
; execute php code.
c32844
; Note: set an empty value to allow all extensions.
c32844
; Default Value: .php
c32844
;security.limit_extensions = .php .php3 .php4 .php5 .php7
c32844
c32844
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
c32844
; the current environment.
c32844
; Default Value: clean env
c32844
;env[HOSTNAME] = $HOSTNAME
c32844
;env[PATH] = /usr/local/bin:/usr/bin:/bin
c32844
;env[TMP] = /tmp
c32844
;env[TMPDIR] = /tmp
c32844
;env[TEMP] = /tmp
c32844
c32844
; Additional php.ini defines, specific to this pool of workers. These settings
c32844
; overwrite the values previously defined in the php.ini. The directives are the
c32844
; same as the PHP SAPI:
c32844
;   php_value/php_flag             - you can set classic ini defines which can
c32844
;                                    be overwritten from PHP call 'ini_set'.
c32844
;   php_admin_value/php_admin_flag - these directives won't be overwritten by
c32844
;                                     PHP call 'ini_set'
c32844
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
c32844
c32844
; Defining 'extension' will load the corresponding shared extension from
c32844
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
c32844
; overwrite previously defined php.ini values, but will append the new value
c32844
; instead.
c32844
c32844
; Note: path INI options can be relative and will be expanded with the prefix
c32844
; (pool, global or @prefix@)
c32844
c32844
; Default Value: nothing is defined by default except the values in php.ini and
c32844
;                specified at startup with the -d argument
c32844
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
c32844
;php_flag[display_errors] = off
c32844
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
c32844
php_admin_flag[log_errors] = on
c32844
;php_admin_value[memory_limit] = 128M
c32844
c32844
; Set the following data paths to directories owned by the FPM process user.
c32844
;
c32844
; Do not change the ownership of existing system directories, if the process
c32844
; user does not have write permission, create dedicated directories for this
c32844
; purpose.
c32844
;
c32844
; See warning about choosing the location of these directories on your system
c32844
; at http://php.net/session.save-path
c32844
php_value[session.save_handler] = files
c32844
php_value[session.save_path]    = /var/lib/php/session
c32844
php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache
c32844
;php_value[opcache.file_cache]  = /var/lib/php/opcache