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