Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

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