Guest User

Untitled

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