www.conf 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. ; Start a new pool named 'www'.
  2. [www]
  3. ; The address on which to accept FastCGI requests.
  4. ; Valid syntaxes are:
  5. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
  6. ; a specific port;
  7. ; 'port' - to listen on a TCP socket to all addresses on a
  8. ; specific port;
  9. ; '/path/to/unix/socket' - to listen on a unix socket.
  10. ; Note: This value is mandatory.
  11. listen = 9000
  12. ; Set listen(2) backlog. A value of '-1' means unlimited.
  13. ; Default Value: -1
  14. ;listen.backlog = -1
  15. ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
  16. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  17. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  18. ; must be separated by a comma. If this value is left blank, connections will be
  19. ; accepted from any ip address.
  20. ; Default Value: any
  21. listen.allowed_clients = 127.0.0.1
  22. ; Set permissions for unix socket, if one is used. In Linux, read/write
  23. ; permissions must be set in order to allow connections from a web server. Many
  24. ; BSD-derived systems allow connections regardless of permissions.
  25. ; Default Values: user and group are set as the running user
  26. ; mode is set to 0666
  27. ;listen.owner = nobody
  28. ;listen.group = nobody
  29. ;listen.mode = 0666
  30. ; Unix user/group of processes
  31. ; Note: The user is mandatory. If the group is not set, the default user's group
  32. ; will be used.
  33. ; RPM: apache Choosed to be able to access some dir as httpd
  34. user = www-data
  35. ; RPM: Keep a group allowed to write in log dir.
  36. group = www-data
  37. ; Choose how the process manager will control the number of child processes.
  38. ; Possible Values:
  39. ; static - a fixed number (pm.max_children) of child processes;
  40. ; dynamic - the number of child processes are set dynamically based on the
  41. ; following directives:
  42. ; pm.max_children - the maximum number of children that can
  43. ; be alive at the same time.
  44. ; pm.start_servers - the number of children created on startup.
  45. ; pm.min_spare_servers - the minimum number of children in 'idle'
  46. ; state (waiting to process). If the number
  47. ; of 'idle' processes is less than this
  48. ; number then some children will be created.
  49. ; pm.max_spare_servers - the maximum number of children in 'idle'
  50. ; state (waiting to process). If the number
  51. ; of 'idle' processes is greater than this
  52. ; number then some children will be killed.
  53. ; Note: This value is mandatory.
  54. pm = dynamic
  55. ; The number of child processes to be created when pm is set to 'static' and the
  56. ; maximum number of child processes to be created when pm is set to 'dynamic'.
  57. ; This value sets the limit on the number of simultaneous requests that will be
  58. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  59. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  60. ; CGI.
  61. ; Note: Used when pm is set to either 'static' or 'dynamic'
  62. ; Note: This value is mandatory.
  63. pm.max_children = 50
  64. ; The number of child processes created on startup.
  65. ; Note: Used only when pm is set to 'dynamic'
  66. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  67. pm.start_servers = 5
  68. ; The desired minimum number of idle server processes.
  69. ; Note: Used only when pm is set to 'dynamic'
  70. ; Note: Mandatory when pm is set to 'dynamic'
  71. pm.min_spare_servers = 5
  72. ; The desired maximum number of idle server processes.
  73. ; Note: Used only when pm is set to 'dynamic'
  74. ; Note: Mandatory when pm is set to 'dynamic'
  75. pm.max_spare_servers = 35
  76. ; The number of requests each child process should execute before respawning.
  77. ; This can be useful to work around memory leaks in 3rd party libraries. For
  78. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  79. ; Default Value: 0
  80. ;pm.max_requests = 500
  81. ; The URI to view the FPM status page. If this value is not set, no URI will be
  82. ; recognized as a status page. By default, the status page shows the following
  83. ; information:
  84. ; accepted conn - the number of request accepted by the pool;
  85. ; pool - the name of the pool;
  86. ; process manager - static or dynamic;
  87. ; idle processes - the number of idle processes;
  88. ; active processes - the number of active processes;
  89. ; total processes - the number of idle + active processes.
  90. ; The values of 'idle processes', 'active processes' and 'total processes' are
  91. ; updated each second. The value of 'accepted conn' is updated in real time.
  92. ; Example output:
  93. ; accepted conn: 12073
  94. ; pool: www
  95. ; process manager: static
  96. ; idle processes: 35
  97. ; active processes: 65
  98. ; total processes: 100
  99. ; By default the status page output is formatted as text/plain. Passing either
  100. ; 'html' or 'json' as a query string will return the corresponding output
  101. ; syntax. Example:
  102. ; http://www.foo.bar/status
  103. ; http://www.foo.bar/status?json
  104. ; http://www.foo.bar/status?html
  105. ; Note: The value must start with a leading slash (/). The value can be
  106. ; anything, but it may not be a good idea to use the .php extension or it
  107. ; may conflict with a real PHP file.
  108. ; Default Value: not set
  109. ;pm.status_path = /status
  110. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  111. ; URI will be recognized as a ping page. This could be used to test from outside
  112. ; that FPM is alive and responding, or to
  113. ; - create a graph of FPM availability (rrd or such);
  114. ; - remove a server from a group if it is not responding (load balancing);
  115. ; - trigger alerts for the operating team (24/7).
  116. ; Note: The value must start with a leading slash (/). The value can be
  117. ; anything, but it may not be a good idea to use the .php extension or it
  118. ; may conflict with a real PHP file.
  119. ; Default Value: not set
  120. ;ping.path = /ping
  121. ; This directive may be used to customize the response of a ping request. The
  122. ; response is formatted as text/plain with a 200 response code.
  123. ; Default Value: pong
  124. ;ping.response = pong
  125. ; The timeout for serving a single request after which the worker process will
  126. ; be killed. This option should be used when the 'max_execution_time' ini option
  127. ; does not stop script execution for some reason. A value of '0' means 'off'.
  128. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  129. ; Default Value: 0
  130. ;request_terminate_timeout = 0
  131. ; The timeout for serving a single request after which a PHP backtrace will be
  132. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  133. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  134. ; Default Value: 0
  135. ;request_slowlog_timeout = 0
  136. ; The log file for slow requests
  137. ; Default Value: not set
  138. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  139. slowlog = /var/log/php-fpm/www-slow.log
  140. ; Set open file descriptor rlimit.
  141. ; Default Value: system defined value
  142. ;rlimit_files = 1024
  143. ; Set max core size rlimit.
  144. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  145. ; Default Value: system defined value
  146. ;rlimit_core = 0
  147. ; Chroot to this directory at the start. This value must be defined as an
  148. ; absolute path. When this value is not set, chroot is not used.
  149. ; Note: chrooting is a great security feature and should be used whenever
  150. ; possible. However, all PHP paths will be relative to the chroot
  151. ; (error_log, sessions.save_path, ...).
  152. ; Default Value: not set
  153. ;chroot =
  154. ; Chdir to this directory at the start. This value must be an absolute path.
  155. ; Default Value: current directory or / when chroot
  156. ;chdir = /var/www
  157. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  158. ; stderr will be redirected to /dev/null according to FastCGI specs.
  159. ; Default Value: no
  160. ;catch_workers_output = yes
  161. ; Limits the extensions of the main script FPM will allow to parse. This can
  162. ; prevent configuration mistakes on the web server side. You should only limit
  163. ; FPM to .php extensions to prevent malicious users to use other extensions to
  164. ; exectute php code.
  165. ; Note: set an empty value to allow all extensions.
  166. ; Default Value: .php
  167. ;security.limit_extensions = .php .php3 .php4 .php5
  168. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  169. ; the current environment.
  170. ; Default Value: clean env
  171. ;env[HOSTNAME] = $HOSTNAME
  172. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  173. ;env[TMP] = /tmp
  174. ;env[TMPDIR] = /tmp
  175. ;env[TEMP] = /tmp
  176. ; Additional php.ini defines, specific to this pool of workers. These settings
  177. ; overwrite the values previously defined in the php.ini. The directives are the
  178. ; same as the PHP SAPI:
  179. ; php_value/php_flag - you can set classic ini defines which can
  180. ; be overwritten from PHP call 'ini_set'.
  181. ; php_admin_value/php_admin_flag - these directives won't be overwritten by
  182. ; PHP call 'ini_set'
  183. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  184. ; Defining 'extension' will load the corresponding shared extension from
  185. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  186. ; overwrite previously defined php.ini values, but will append the new value
  187. ; instead.
  188. ; Default Value: nothing is defined by default except the values in php.ini and
  189. ; specified at startup with the -d argument
  190. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
  191. ;php_flag[display_errors] = off
  192. php_admin_value[error_log] = /var/log/php-fpm/www-error.log
  193. php_admin_flag[log_errors] = on
  194. ;php_admin_value[memory_limit] = 128M
  195. ; Set session path to a directory owned by process user
  196. php_value[session.save_handler] = files
  197. php_value[session.save_path] = /var/lib/php/session