Blame SOURCES/php-fpm-www.conf

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