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