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