|
|
@ -1,10 +1,11 @@
|
|
|
|
; Start a new pool named 'www'.
|
|
|
|
; Start a new pool named 'www'.
|
|
|
|
; the variable $pool can we used in any directive and will be replaced by the
|
|
|
|
; the variable $pool can be used in any directive and will be replaced by the
|
|
|
|
; pool name ('www' here)
|
|
|
|
; pool name ('www' here)
|
|
|
|
[__NAMETOCHANGE__]
|
|
|
|
[__NAMETOCHANGE__]
|
|
|
|
|
|
|
|
|
|
|
|
; Per pool prefix
|
|
|
|
; Per pool prefix
|
|
|
|
; It only applies on the following directives:
|
|
|
|
; It only applies on the following directives:
|
|
|
|
|
|
|
|
; - 'access.log'
|
|
|
|
; - 'slowlog'
|
|
|
|
; - 'slowlog'
|
|
|
|
; - 'listen' (unixsocket)
|
|
|
|
; - 'listen' (unixsocket)
|
|
|
|
; - 'chroot'
|
|
|
|
; - 'chroot'
|
|
|
@ -24,17 +25,19 @@ group = __USER__
|
|
|
|
|
|
|
|
|
|
|
|
; The address on which to accept FastCGI requests.
|
|
|
|
; The address on which to accept FastCGI requests.
|
|
|
|
; Valid syntaxes are:
|
|
|
|
; Valid syntaxes are:
|
|
|
|
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
|
|
|
|
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
|
|
|
; a specific port;
|
|
|
|
; a specific port;
|
|
|
|
; 'port' - to listen on a TCP socket to all addresses on a
|
|
|
|
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
|
|
|
; specific port;
|
|
|
|
; a specific port;
|
|
|
|
|
|
|
|
; 'port' - to listen on a TCP socket to all addresses
|
|
|
|
|
|
|
|
; (IPv6 and IPv4-mapped) on a specific port;
|
|
|
|
; '/path/to/unix/socket' - to listen on a unix socket.
|
|
|
|
; '/path/to/unix/socket' - to listen on a unix socket.
|
|
|
|
; Note: This value is mandatory.
|
|
|
|
; Note: This value is mandatory.
|
|
|
|
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
|
|
|
listen = /run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
|
|
|
|
|
|
|
|
|
|
|
; Set listen(2) backlog. A value of '-1' means unlimited.
|
|
|
|
; Set listen(2) backlog.
|
|
|
|
; Default Value: 128 (-1 on FreeBSD and OpenBSD)
|
|
|
|
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
|
|
|
;listen.backlog = 128
|
|
|
|
;listen.backlog = 511
|
|
|
|
|
|
|
|
|
|
|
|
; Set permissions for unix socket, if one is used. In Linux, read/write
|
|
|
|
; Set permissions for unix socket, if one is used. In Linux, read/write
|
|
|
|
; permissions must be set in order to allow connections from a web server. Many
|
|
|
|
; permissions must be set in order to allow connections from a web server. Many
|
|
|
@ -44,8 +47,13 @@ listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
|
|
|
listen.owner = www-data
|
|
|
|
listen.owner = www-data
|
|
|
|
listen.group = www-data
|
|
|
|
listen.group = www-data
|
|
|
|
;listen.mode = 0660
|
|
|
|
;listen.mode = 0660
|
|
|
|
|
|
|
|
; When POSIX Access Control Lists are supported you can set them using
|
|
|
|
|
|
|
|
; these options, value is a comma separated list of user/group names.
|
|
|
|
|
|
|
|
; When set, listen.owner and listen.group are ignored
|
|
|
|
|
|
|
|
;listen.acl_users =
|
|
|
|
|
|
|
|
;listen.acl_groups =
|
|
|
|
|
|
|
|
|
|
|
|
; List of ipv4 addresses of FastCGI clients which are allowed to connect.
|
|
|
|
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
|
|
|
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
|
|
|
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
|
|
|
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
|
|
|
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
|
|
|
; must be separated by a comma. If this value is left blank, connections will be
|
|
|
|
; must be separated by a comma. If this value is left blank, connections will be
|
|
|
@ -59,7 +67,13 @@ listen.group = www-data
|
|
|
|
; - The pool processes will inherit the master process priority
|
|
|
|
; - The pool processes will inherit the master process priority
|
|
|
|
; unless it specified otherwise
|
|
|
|
; unless it specified otherwise
|
|
|
|
; Default Value: no set
|
|
|
|
; Default Value: no set
|
|
|
|
; priority = -19
|
|
|
|
; process.priority = -19
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
|
|
|
|
|
|
|
|
; or group is differrent than the master process user. It allows to create process
|
|
|
|
|
|
|
|
; core dump and ptrace the process for the pool user.
|
|
|
|
|
|
|
|
; Default Value: no
|
|
|
|
|
|
|
|
; process.dumpable = yes
|
|
|
|
|
|
|
|
|
|
|
|
; Choose how the process manager will control the number of child processes.
|
|
|
|
; Choose how the process manager will control the number of child processes.
|
|
|
|
; Possible Values:
|
|
|
|
; Possible Values:
|
|
|
@ -96,7 +110,7 @@ pm = dynamic
|
|
|
|
; forget to tweak pm.* to fit your needs.
|
|
|
|
; forget to tweak pm.* to fit your needs.
|
|
|
|
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
|
|
|
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
|
|
|
; Note: This value is mandatory.
|
|
|
|
; Note: This value is mandatory.
|
|
|
|
pm.max_children = 10
|
|
|
|
pm.max_children = 5
|
|
|
|
|
|
|
|
|
|
|
|
; The number of child processes created on startup.
|
|
|
|
; The number of child processes created on startup.
|
|
|
|
; Note: Used only when pm is set to 'dynamic'
|
|
|
|
; Note: Used only when pm is set to 'dynamic'
|
|
|
@ -122,7 +136,7 @@ pm.max_spare_servers = 3
|
|
|
|
; This can be useful to work around memory leaks in 3rd party libraries. For
|
|
|
|
; This can be useful to work around memory leaks in 3rd party libraries. For
|
|
|
|
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
|
|
|
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
|
|
|
; Default Value: 0
|
|
|
|
; Default Value: 0
|
|
|
|
pm.max_requests = 500
|
|
|
|
;pm.max_requests = 500
|
|
|
|
|
|
|
|
|
|
|
|
; The URI to view the FPM status page. If this value is not set, no URI will be
|
|
|
|
; The URI to view the FPM status page. If this value is not set, no URI will be
|
|
|
|
; recognized as a status page. It shows the following informations:
|
|
|
|
; recognized as a status page. It shows the following informations:
|
|
|
@ -215,7 +229,7 @@ pm.max_requests = 500
|
|
|
|
; last request memory: 0
|
|
|
|
; last request memory: 0
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; Note: There is a real-time FPM status monitoring sample web page available
|
|
|
|
; Note: There is a real-time FPM status monitoring sample web page available
|
|
|
|
; It's available in: ${prefix}/share/fpm/status.html
|
|
|
|
; It's available in: /usr/share/php/7.0/fpm/status.html
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; Note: The value must start with a leading slash (/). The value can be
|
|
|
|
; Note: The value must start with a leading slash (/). The value can be
|
|
|
|
; anything, but it may not be a good idea to use the .php extension or it
|
|
|
|
; anything, but it may not be a good idea to use the .php extension or it
|
|
|
@ -275,7 +289,7 @@ pm.max_requests = 500
|
|
|
|
; - %{megabytes}M
|
|
|
|
; - %{megabytes}M
|
|
|
|
; - %{mega}M
|
|
|
|
; - %{mega}M
|
|
|
|
; %n: pool name
|
|
|
|
; %n: pool name
|
|
|
|
; %o: ouput header
|
|
|
|
; %o: output header
|
|
|
|
; it must be associated with embraces to specify the name of the header:
|
|
|
|
; it must be associated with embraces to specify the name of the header:
|
|
|
|
; - %{Content-Type}o
|
|
|
|
; - %{Content-Type}o
|
|
|
|
; - %{X-Powered-By}o
|
|
|
|
; - %{X-Powered-By}o
|
|
|
@ -291,9 +305,13 @@ pm.max_requests = 500
|
|
|
|
; %t: server time the request was received
|
|
|
|
; %t: server time the request was received
|
|
|
|
; it can accept a strftime(3) format:
|
|
|
|
; it can accept a strftime(3) format:
|
|
|
|
; %d/%b/%Y:%H:%M:%S %z (default)
|
|
|
|
; %d/%b/%Y:%H:%M:%S %z (default)
|
|
|
|
|
|
|
|
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
|
|
|
|
|
|
|
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
|
|
|
; %T: time the log has been written (the request has finished)
|
|
|
|
; %T: time the log has been written (the request has finished)
|
|
|
|
; it can accept a strftime(3) format:
|
|
|
|
; it can accept a strftime(3) format:
|
|
|
|
; %d/%b/%Y:%H:%M:%S %z (default)
|
|
|
|
; %d/%b/%Y:%H:%M:%S %z (default)
|
|
|
|
|
|
|
|
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
|
|
|
|
|
|
|
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
|
|
|
; %u: remote user
|
|
|
|
; %u: remote user
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; Default: "%R - %u %t \"%m %r\" %s"
|
|
|
|
; Default: "%R - %u %t \"%m %r\" %s"
|
|
|
@ -302,13 +320,13 @@ pm.max_requests = 500
|
|
|
|
; The log file for slow requests
|
|
|
|
; The log file for slow requests
|
|
|
|
; Default Value: not set
|
|
|
|
; Default Value: not set
|
|
|
|
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
|
|
|
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
|
|
|
slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log
|
|
|
|
;slowlog = log/$pool.log.slow
|
|
|
|
|
|
|
|
|
|
|
|
; The timeout for serving a single request after which a PHP backtrace will be
|
|
|
|
; The timeout for serving a single request after which a PHP backtrace will be
|
|
|
|
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
|
|
|
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
|
|
|
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
|
|
|
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
|
|
|
; Default Value: 0
|
|
|
|
; Default Value: 0
|
|
|
|
request_slowlog_timeout = 5s
|
|
|
|
;request_slowlog_timeout = 0
|
|
|
|
|
|
|
|
|
|
|
|
; The timeout for serving a single request after which the worker process will
|
|
|
|
; The timeout for serving a single request after which the worker process will
|
|
|
|
; be killed. This option should be used when the 'max_execution_time' ini option
|
|
|
|
; be killed. This option should be used when the 'max_execution_time' ini option
|
|
|
@ -347,12 +365,21 @@ chdir = __FINALPATH__
|
|
|
|
; Note: on highloaded environement, this can cause some delay in the page
|
|
|
|
; Note: on highloaded environement, this can cause some delay in the page
|
|
|
|
; process time (several ms).
|
|
|
|
; process time (several ms).
|
|
|
|
; Default Value: no
|
|
|
|
; Default Value: no
|
|
|
|
catch_workers_output = yes
|
|
|
|
;catch_workers_output = yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Clear environment in FPM workers
|
|
|
|
|
|
|
|
; Prevents arbitrary environment variables from reaching FPM worker processes
|
|
|
|
|
|
|
|
; by clearing the environment in workers before env vars specified in this
|
|
|
|
|
|
|
|
; pool configuration are added.
|
|
|
|
|
|
|
|
; Setting to "no" will make all environment variables available to PHP code
|
|
|
|
|
|
|
|
; via getenv(), $_ENV and $_SERVER.
|
|
|
|
|
|
|
|
; Default Value: yes
|
|
|
|
|
|
|
|
;clear_env = no
|
|
|
|
|
|
|
|
|
|
|
|
; Limits the extensions of the main script FPM will allow to parse. This can
|
|
|
|
; Limits the extensions of the main script FPM will allow to parse. This can
|
|
|
|
; prevent configuration mistakes on the web server side. You should only limit
|
|
|
|
; prevent configuration mistakes on the web server side. You should only limit
|
|
|
|
; FPM to .php extensions to prevent malicious users to use other extensions to
|
|
|
|
; FPM to .php extensions to prevent malicious users to use other extensions to
|
|
|
|
; exectute php code.
|
|
|
|
; execute php code.
|
|
|
|
; Note: set an empty value to allow all extensions.
|
|
|
|
; Note: set an empty value to allow all extensions.
|
|
|
|
; Default Value: .php
|
|
|
|
; Default Value: .php
|
|
|
|
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
|
|
|
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
|
|
|