www.conf 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. ; Start a new pool named 'www'.
  2. ; the variable $pool can be used in any directive and will be replaced by the
  3. ; pool name ('www' here)
  4. [www]
  5. ; Per pool prefix
  6. ; It only applies on the following directives:
  7. ; - 'access.log'
  8. ; - 'slowlog'
  9. ; - 'listen' (unixsocket)
  10. ; - 'chroot'
  11. ; - 'chdir'
  12. ; - 'php_values'
  13. ; - 'php_admin_values'
  14. ; When not set, the global prefix (or /usr) applies instead.
  15. ; Note: This directive can also be relative to the global prefix.
  16. ; Default Value: none
  17. ;prefix = /path/to/pools/$pool
  18. ; Unix user/group of processes
  19. ; Note: The user is mandatory. If the group is not set, the default user's group
  20. ; will be used.
  21. user = nobody
  22. group = nobody
  23. ; The address on which to accept FastCGI requests.
  24. ; Valid syntaxes are:
  25. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
  26. ; a specific port;
  27. ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
  28. ; a specific port;
  29. ; 'port' - to listen on a TCP socket to all addresses
  30. ; (IPv6 and IPv4-mapped) on a specific port;
  31. ; '/path/to/unix/socket' - to listen on a unix socket.
  32. ; Note: This value is mandatory.
  33. listen = :::9000
  34. ; Set listen(2) backlog.
  35. ; Default Value: 511 (-1 on FreeBSD and OpenBSD)
  36. ;listen.backlog = 511
  37. ; Set permissions for unix socket, if one is used. In Linux, read/write
  38. ; permissions must be set in order to allow connections from a web server. Many
  39. ; BSD-derived systems allow connections regardless of permissions.
  40. ; Default Values: user and group are set as the running user
  41. ; mode is set to 0660
  42. ;listen.owner = nobody
  43. ;listen.group = nobody
  44. ;listen.mode = 0660
  45. ; When POSIX Access Control Lists are supported you can set them using
  46. ; these options, value is a comma separated list of user/group names.
  47. ; When set, listen.owner and listen.group are ignored
  48. ;listen.acl_users =
  49. ;listen.acl_groups =
  50. ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
  51. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  52. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  53. ; must be separated by a comma. If this value is left blank, connections will be
  54. ; accepted from any ip address.
  55. ; Default Value: any
  56. ;listen.allowed_clients = 127.0.0.1
  57. ; Specify the nice(2) priority to apply to the pool processes (only if set)
  58. ; The value can vary from -19 (highest priority) to 20 (lower priority)
  59. ; Note: - It will only work if the FPM master process is launched as root
  60. ; - The pool processes will inherit the master process priority
  61. ; unless it specified otherwise
  62. ; Default Value: no set
  63. ; process.priority = -19
  64. ; Choose how the process manager will control the number of child processes.
  65. ; Possible Values:
  66. ; static - a fixed number (pm.max_children) of child processes;
  67. ; dynamic - the number of child processes are set dynamically based on the
  68. ; following directives. With this process management, there will be
  69. ; always at least 1 children.
  70. ; pm.max_children - the maximum number of children that can
  71. ; be alive at the same time.
  72. ; pm.start_servers - the number of children created on startup.
  73. ; pm.min_spare_servers - the minimum number of children in 'idle'
  74. ; state (waiting to process). If the number
  75. ; of 'idle' processes is less than this
  76. ; number then some children will be created.
  77. ; pm.max_spare_servers - the maximum number of children in 'idle'
  78. ; state (waiting to process). If the number
  79. ; of 'idle' processes is greater than this
  80. ; number then some children will be killed.
  81. ; ondemand - no children are created at startup. Children will be forked when
  82. ; new requests will connect. The following parameter are used:
  83. ; pm.max_children - the maximum number of children that
  84. ; can be alive at the same time.
  85. ; pm.process_idle_timeout - The number of seconds after which
  86. ; an idle process will be killed.
  87. ; Note: This value is mandatory.
  88. pm = dynamic
  89. ; The number of child processes to be created when pm is set to 'static' and the
  90. ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
  91. ; This value sets the limit on the number of simultaneous requests that will be
  92. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  93. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  94. ; CGI. The below defaults are based on a server without much resources. Don't
  95. ; forget to tweak pm.* to fit your needs.
  96. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
  97. ; Note: This value is mandatory.
  98. pm.max_children = 200
  99. ; The number of child processes created on startup.
  100. ; Note: Used only when pm is set to 'dynamic'
  101. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  102. pm.start_servers = 20
  103. ; The desired minimum number of idle server processes.
  104. ; Note: Used only when pm is set to 'dynamic'
  105. ; Note: Mandatory when pm is set to 'dynamic'
  106. pm.min_spare_servers = 20
  107. ; The desired maximum number of idle server processes.
  108. ; Note: Used only when pm is set to 'dynamic'
  109. ; Note: Mandatory when pm is set to 'dynamic'
  110. pm.max_spare_servers = 50
  111. ; The number of seconds after which an idle process will be killed.
  112. ; Note: Used only when pm is set to 'ondemand'
  113. ; Default Value: 10s
  114. ;pm.process_idle_timeout = 10s;
  115. ; The number of requests each child process should execute before respawning.
  116. ; This can be useful to work around memory leaks in 3rd party libraries. For
  117. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  118. ; Default Value: 0
  119. ;pm.max_requests = 500
  120. ; The URI to view the FPM status page. If this value is not set, no URI will be
  121. ; recognized as a status page. It shows the following informations:
  122. ; pool - the name of the pool;
  123. ; process manager - static, dynamic or ondemand;
  124. ; start time - the date and time FPM has started;
  125. ; start since - number of seconds since FPM has started;
  126. ; accepted conn - the number of request accepted by the pool;
  127. ; listen queue - the number of request in the queue of pending
  128. ; connections (see backlog in listen(2));
  129. ; max listen queue - the maximum number of requests in the queue
  130. ; of pending connections since FPM has started;
  131. ; listen queue len - the size of the socket queue of pending connections;
  132. ; idle processes - the number of idle processes;
  133. ; active processes - the number of active processes;
  134. ; total processes - the number of idle + active processes;
  135. ; max active processes - the maximum number of active processes since FPM
  136. ; has started;
  137. ; max children reached - number of times, the process limit has been reached,
  138. ; when pm tries to start more children (works only for
  139. ; pm 'dynamic' and 'ondemand');
  140. ; Value are updated in real time.
  141. ; Example output:
  142. ; pool: www
  143. ; process manager: static
  144. ; start time: 01/Jul/2011:17:53:49 +0200
  145. ; start since: 62636
  146. ; accepted conn: 190460
  147. ; listen queue: 0
  148. ; max listen queue: 1
  149. ; listen queue len: 42
  150. ; idle processes: 4
  151. ; active processes: 11
  152. ; total processes: 15
  153. ; max active processes: 12
  154. ; max children reached: 0
  155. ;
  156. ; By default the status page output is formatted as text/plain. Passing either
  157. ; 'html', 'xml' or 'json' in the query string will return the corresponding
  158. ; output syntax. Example:
  159. ; http://www.foo.bar/status
  160. ; http://www.foo.bar/status?json
  161. ; http://www.foo.bar/status?html
  162. ; http://www.foo.bar/status?xml
  163. ;
  164. ; By default the status page only outputs short status. Passing 'full' in the
  165. ; query string will also return status for each pool process.
  166. ; Example:
  167. ; http://www.foo.bar/status?full
  168. ; http://www.foo.bar/status?json&full
  169. ; http://www.foo.bar/status?html&full
  170. ; http://www.foo.bar/status?xml&full
  171. ; The Full status returns for each process:
  172. ; pid - the PID of the process;
  173. ; state - the state of the process (Idle, Running, ...);
  174. ; start time - the date and time the process has started;
  175. ; start since - the number of seconds since the process has started;
  176. ; requests - the number of requests the process has served;
  177. ; request duration - the duration in µs of the requests;
  178. ; request method - the request method (GET, POST, ...);
  179. ; request URI - the request URI with the query string;
  180. ; content length - the content length of the request (only with POST);
  181. ; user - the user (PHP_AUTH_USER) (or '-' if not set);
  182. ; script - the main script called (or '-' if not set);
  183. ; last request cpu - the %cpu the last request consumed
  184. ; it's always 0 if the process is not in Idle state
  185. ; because CPU calculation is done when the request
  186. ; processing has terminated;
  187. ; last request memory - the max amount of memory the last request consumed
  188. ; it's always 0 if the process is not in Idle state
  189. ; because memory calculation is done when the request
  190. ; processing has terminated;
  191. ; If the process is in Idle state, then informations are related to the
  192. ; last request the process has served. Otherwise informations are related to
  193. ; the current request being served.
  194. ; Example output:
  195. ; ************************
  196. ; pid: 31330
  197. ; state: Running
  198. ; start time: 01/Jul/2011:17:53:49 +0200
  199. ; start since: 63087
  200. ; requests: 12808
  201. ; request duration: 1250261
  202. ; request method: GET
  203. ; request URI: /test_mem.php?N=10000
  204. ; content length: 0
  205. ; user: -
  206. ; script: /home/fat/web/docs/php/test_mem.php
  207. ; last request cpu: 0.00
  208. ; last request memory: 0
  209. ;
  210. ; Note: There is a real-time FPM status monitoring sample web page available
  211. ; It's available in: /usr/share/php7/fpm/status.html
  212. ;
  213. ; Note: The value must start with a leading slash (/). The value can be
  214. ; anything, but it may not be a good idea to use the .php extension or it
  215. ; may conflict with a real PHP file.
  216. ; Default Value: not set
  217. ;pm.status_path = /status
  218. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  219. ; URI will be recognized as a ping page. This could be used to test from outside
  220. ; that FPM is alive and responding, or to
  221. ; - create a graph of FPM availability (rrd or such);
  222. ; - remove a server from a group if it is not responding (load balancing);
  223. ; - trigger alerts for the operating team (24/7).
  224. ; Note: The value must start with a leading slash (/). The value can be
  225. ; anything, but it may not be a good idea to use the .php extension or it
  226. ; may conflict with a real PHP file.
  227. ; Default Value: not set
  228. ;ping.path = /ping
  229. ; This directive may be used to customize the response of a ping request. The
  230. ; response is formatted as text/plain with a 200 response code.
  231. ; Default Value: pong
  232. ;ping.response = pong
  233. ; The access log file
  234. ; Default: not set
  235. ;access.log = log/php7/$pool.access.log
  236. ; The access log format.
  237. ; The following syntax is allowed
  238. ; %%: the '%' character
  239. ; %C: %CPU used by the request
  240. ; it can accept the following format:
  241. ; - %{user}C for user CPU only
  242. ; - %{system}C for system CPU only
  243. ; - %{total}C for user + system CPU (default)
  244. ; %d: time taken to serve the request
  245. ; it can accept the following format:
  246. ; - %{seconds}d (default)
  247. ; - %{miliseconds}d
  248. ; - %{mili}d
  249. ; - %{microseconds}d
  250. ; - %{micro}d
  251. ; %e: an environment variable (same as $_ENV or $_SERVER)
  252. ; it must be associated with embraces to specify the name of the env
  253. ; variable. Some exemples:
  254. ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
  255. ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
  256. ; %f: script filename
  257. ; %l: content-length of the request (for POST request only)
  258. ; %m: request method
  259. ; %M: peak of memory allocated by PHP
  260. ; it can accept the following format:
  261. ; - %{bytes}M (default)
  262. ; - %{kilobytes}M
  263. ; - %{kilo}M
  264. ; - %{megabytes}M
  265. ; - %{mega}M
  266. ; %n: pool name
  267. ; %o: output header
  268. ; it must be associated with embraces to specify the name of the header:
  269. ; - %{Content-Type}o
  270. ; - %{X-Powered-By}o
  271. ; - %{Transfert-Encoding}o
  272. ; - ....
  273. ; %p: PID of the child that serviced the request
  274. ; %P: PID of the parent of the child that serviced the request
  275. ; %q: the query string
  276. ; %Q: the '?' character if query string exists
  277. ; %r: the request URI (without the query string, see %q and %Q)
  278. ; %R: remote IP address
  279. ; %s: status (response code)
  280. ; %t: server time the request was received
  281. ; it can accept a strftime(3) format:
  282. ; %d/%b/%Y:%H:%M:%S %z (default)
  283. ; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
  284. ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
  285. ; %T: time the log has been written (the request has finished)
  286. ; it can accept a strftime(3) format:
  287. ; %d/%b/%Y:%H:%M:%S %z (default)
  288. ; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
  289. ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
  290. ; %u: remote user
  291. ;
  292. ; Default: "%R - %u %t \"%m %r\" %s"
  293. ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
  294. ; The log file for slow requests
  295. ; Default Value: not set
  296. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  297. ;slowlog = log/php7/$pool.slow.log
  298. ; The timeout for serving a single request after which a PHP backtrace will be
  299. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  300. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  301. ; Default Value: 0
  302. ;request_slowlog_timeout = 0
  303. ; The timeout for serving a single request after which the worker process will
  304. ; be killed. This option should be used when the 'max_execution_time' ini option
  305. ; does not stop script execution for some reason. A value of '0' means 'off'.
  306. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  307. ; Default Value: 0
  308. ;request_terminate_timeout = 0
  309. ; Set open file descriptor rlimit.
  310. ; Default Value: system defined value
  311. ;rlimit_files = 1024
  312. ; Set max core size rlimit.
  313. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  314. ; Default Value: system defined value
  315. ;rlimit_core = 0
  316. ; Chroot to this directory at the start. This value must be defined as an
  317. ; absolute path. When this value is not set, chroot is not used.
  318. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
  319. ; of its subdirectories. If the pool prefix is not set, the global prefix
  320. ; will be used instead.
  321. ; Note: chrooting is a great security feature and should be used whenever
  322. ; possible. However, all PHP paths will be relative to the chroot
  323. ; (error_log, sessions.save_path, ...).
  324. ; Default Value: not set
  325. ;chroot =
  326. ; Chdir to this directory at the start.
  327. ; Note: relative path can be used.
  328. ; Default Value: current directory or / when chroot
  329. ;chdir = /var/www
  330. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  331. ; stderr will be redirected to /dev/null according to FastCGI specs.
  332. ; Note: on highloaded environement, this can cause some delay in the page
  333. ; process time (several ms).
  334. ; Default Value: no
  335. ;catch_workers_output = yes
  336. ; Clear environment in FPM workers
  337. ; Prevents arbitrary environment variables from reaching FPM worker processes
  338. ; by clearing the environment in workers before env vars specified in this
  339. ; pool configuration are added.
  340. ; Setting to "no" will make all environment variables available to PHP code
  341. ; via getenv(), $_ENV and $_SERVER.
  342. ; Default Value: yes
  343. ;clear_env = no
  344. ; Limits the extensions of the main script FPM will allow to parse. This can
  345. ; prevent configuration mistakes on the web server side. You should only limit
  346. ; FPM to .php extensions to prevent malicious users to use other extensions to
  347. ; execute php code.
  348. ; Note: set an empty value to allow all extensions.
  349. ; Default Value: .php
  350. ;security.limit_extensions = .php .php3 .php4 .php5 .php7
  351. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  352. ; the current environment.
  353. ; Default Value: clean env
  354. ;env[HOSTNAME] = $HOSTNAME
  355. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  356. ;env[TMP] = /tmp
  357. ;env[TMPDIR] = /tmp
  358. ;env[TEMP] = /tmp
  359. ; Additional php.ini defines, specific to this pool of workers. These settings
  360. ; overwrite the values previously defined in the php.ini. The directives are the
  361. ; same as the PHP SAPI:
  362. ; php_value/php_flag - you can set classic ini defines which can
  363. ; be overwritten from PHP call 'ini_set'.
  364. ; php_admin_value/php_admin_flag - these directives won't be overwritten by
  365. ; PHP call 'ini_set'
  366. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  367. ; Defining 'extension' will load the corresponding shared extension from
  368. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  369. ; overwrite previously defined php.ini values, but will append the new value
  370. ; instead.
  371. ; Note: path INI options can be relative and will be expanded with the prefix
  372. ; (pool, global or /usr)
  373. ; Default Value: nothing is defined by default except the values in php.ini and
  374. ; specified at startup with the -d argument
  375. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
  376. ;php_flag[display_errors] = off
  377. ;php_admin_value[error_log] = /var/log/php7/$pool.error.log
  378. ;php_admin_flag[log_errors] = on
  379. ;php_admin_value[memory_limit] = 32M