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