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