Guest User

Untitled

a guest
Jun 11th, 2011
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.75 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;
  2. ; FPM Configuration ;
  3. ;;;;;;;;;;;;;;;;;;;;;
  4.  
  5. ; All relative paths in this configuration file are relative to PHP's install
  6. ; prefix (/usr/local). This prefix can be dynamicaly changed by using the
  7. ; '-p' argument from the command line.
  8.  
  9. ; Include one or more files. If glob(3) exists, it is used to include a bunch of
  10. ; files from a glob(3) pattern. This directive can be used everywhere in the
  11. ; file.
  12. ; Relative path can also be used. They will be prefixed by:
  13. ; - the global prefix if it's been set (-p arguement)
  14. ; - /usr/local otherwise
  15. ;include=etc/fpm.d/*.conf
  16.  
  17. ;;;;;;;;;;;;;;;;;;
  18. ; Global Options ;
  19. ;;;;;;;;;;;;;;;;;;
  20.  
  21. [global]
  22. ; Pid file
  23. ; Note: the default prefix is /usr/local/var
  24. ; Default Value: none
  25. pid = /var/run/php-fpm.pid
  26.  
  27. ; Error log file
  28. ; Note: the default prefix is /usr/local/var
  29. ; Default Value: log/php-fpm.log
  30. error_log = /var/log/php-fpm.log
  31.  
  32. ; Log level
  33. ; Possible Values: alert, error, warning, notice, debug
  34. ; Default Value: notice
  35. log_level = error
  36.  
  37. ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
  38. ; interval set by emergency_restart_interval then FPM will restart. A value
  39. ; of '0' means 'Off'.
  40. ; Default Value: 0
  41. ;emergency_restart_threshold = 0
  42.  
  43. ; Interval of time used by emergency_restart_interval to determine when
  44. ; a graceful restart will be initiated. This can be useful to work around
  45. ; accidental corruptions in an accelerator's shared memory.
  46. ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
  47. ; Default Unit: seconds
  48. ; Default Value: 0
  49. ;emergency_restart_interval = 0
  50.  
  51. ; Time limit for child processes to wait for a reaction on signals from master.
  52. ; Available units: s(econds), m(inutes), h(ours), or d(ays)
  53. ; Default Unit: seconds
  54. ; Default Value: 0
  55. ;process_control_timeout = 0
  56.  
  57. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
  58. ; Default Value: yes
  59. ;daemonize = yes
  60.  
  61. ;;;;;;;;;;;;;;;;;;;;
  62. ; Pool Definitions ;
  63. ;;;;;;;;;;;;;;;;;;;;
  64.  
  65. ; Multiple pools of child processes may be started with different listening
  66. ; ports and different management options. The name of the pool will be
  67. ; used in logs and stats. There is no limitation on the number of pools which
  68. ; FPM can handle. Your system will tell you anyway :)
  69.  
  70. ; Start a new pool named 'www'.
  71. ; the variable $pool can we used in any directive and will be replaced by the
  72. ; pool name ('www' here)
  73. [www]
  74.  
  75. ; Per pool prefix
  76. ; It only applies on the following directives:
  77. ; - 'slowlog'
  78. ; - 'listen' (unixsocket)
  79. ; - 'chroot'
  80. ; - 'chdir'
  81. ; - 'php_values'
  82. ; - 'php_admin_values'
  83. ; When not set, the global prefix (or /usr/local) applies instead.
  84. ; Note: This directive can also be relative to the global prefix.
  85. ; Default Value: none
  86. ;prefix = /path/to/pools/$pool
  87.  
  88. ; The address on which to accept FastCGI requests.
  89. ; Valid syntaxes are:
  90. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
  91. ; a specific port;
  92. ; 'port' - to listen on a TCP socket to all addresses on a
  93. ; specific port;
  94. ; '/path/to/unix/socket' - to listen on a unix socket.
  95. ; Note: This value is mandatory.
  96. listen = 127.0.0.1:9000
  97.  
  98. ; Set listen(2) backlog. A value of '-1' means unlimited.
  99. ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
  100. ;listen.backlog = -1
  101. ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
  102. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  103. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  104. ; must be separated by a comma. If this value is left blank, connections will be
  105. ; accepted from any ip address.
  106. ; Default Value: any
  107. ;listen.allowed_clients = 127.0.0.1
  108.  
  109. ; Set permissions for unix socket, if one is used. In Linux, read/write
  110. ; permissions must be set in order to allow connections from a web server. Many
  111. ; BSD-derived systems allow connections regardless of permissions.
  112. ; Default Values: user and group are set as the running user
  113. ; mode is set to 0666
  114. ;listen.owner = nobody
  115. ;listen.group = nobody
  116. ;listen.mode = 0666
  117.  
  118. ; Unix user/group of processes
  119. ; Note: The user is mandatory. If the group is not set, the default user's group
  120. ; will be used.
  121. user = nobody
  122. group = users
  123.  
  124. ; Choose how the process manager will control the number of child processes.
  125. ; Possible Values:
  126. ; static - a fixed number (pm.max_children) of child processes;
  127. ; dynamic - the number of child processes are set dynamically based on the
  128. ; following directives:
  129. ; pm.max_children - the maximum number of children that can
  130. ; be alive at the same time.
  131. ; pm.start_servers - the number of children created on startup.
  132. ; pm.min_spare_servers - the minimum number of children in 'idle'
  133. ; ; of 'idle' processes is less than this
  134. ; number then some children will be created.
  135. ; pm.max_spare_servers - the maximum number of children in 'idle'
  136. ; state (waiting to process). If the number
  137. ; of 'idle' processes is greater than this
  138. ; number then some children will be killed.
  139. ; Note: This value is mandatory.
  140. pm = dynamic
  141.  
  142. ; The number of child processes to be created when pm is set to 'static' and the
  143. ; maximum number of child processes to be created when pm is set to 'dynamic'.
  144. ; This value sets the limit on the number of simultaneous requests that will be
  145. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  146. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  147. ; CGI.
  148. ; Note: Used when pm is set to either 'static' or 'dynamic'
  149. ; Note: This value is mandatory.
  150. pm.max_children = 40
  151.  
  152. ; The number of child processes created on startup.
  153. ; Note: Used only when pm is set to 'dynamic'
  154. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  155. pm.start_servers = 25
  156.  
  157. ; The desired minimum number of idle server processes.
  158. ; Note: Used only when pm is set to 'dynamic'
  159. ; Note: Mandatory when pm is set to 'dynamic'
  160. pm.min_spare_servers = 25
  161.  
  162. ; The desired maximum number of idle server processes.
  163. ; Note: Used only when pm is set to 'dynamic'
  164. ; Note: Mandatory when pm is set to 'dynamic'
  165. pm.max_spare_servers = 40
  166. state (waiting to process). If the number
  167. ; The number of requests each child process should execute before respawning.
  168. ; This can be useful to work around memory leaks in 3rd party libraries. For
  169. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  170. ; Default Value: 0
  171. pm.max_requests = 150
  172.  
  173. ; The URI to view the FPM status page. If this value is not set, no URI will be
  174. ; recognized as a status page. By default, the status page shows the following
  175. ; information:
  176. ; accepted conn - the number of request accepted by the pool;
  177. ; pool - the name of the pool;
  178. ; process manager - static or dynamic;
  179. ; idle processes - the number of idle processes;
  180. ; active processes - the number of active processes;
  181. ; total processes - the number of idle + active processes.
  182. ; max children reached - number of times, the process limit has been reached,
  183. ; when pm tries to start more children (works only for
  184. ; pm 'dynamic')
  185. ; The values of 'idle processes', 'active processes' and 'total processes' are
  186. ; updated each second. The value of 'accepted conn' is updated in real time.
  187. ; Example output:
  188. ; accepted conn: 12073
  189. ; pool: www
  190. ; process manager: static
  191. ; idle processes: 35
  192. ; active processes: 65
  193. ; total processes: 100
  194. ; max children reached: 1
  195. ; By default the status page output is formatted as text/plain. Passing either
  196. ; 'html' or 'json' as a query string will return the corresponding output
  197. ; syntax. Example:
  198. ; http://www.foo.bar/status
  199. ; http://www.foo.bar/status?json
  200. ; http://www.foo.bar/status?html
  201. ; Note: The value must start with a leading slash (/). The value can be
  202. ; anything, but it may not be a good idea to use the .php extension or it
  203. ; may conflict with a real PHP file.
  204. ; Default Value: not set
  205. pm.status_path = /pmstatus
  206.  
  207. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  208. ; URI will be recognized as a ping page. This could be used to test from outside
  209. ; that FPM is alive and responding, or to
  210. ; - create a graph of FPM availability (rrd or such);
  211. ; - remove a server from a group if it is not responding (load balancing);
  212. ; - trigger alerts for the operating team (24/7).
  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. ;ping.path = /ping
  218.  
  219. ; This directive may be used to customize the response of a ping request. The
  220. ; response is formatted as text/plain with a 200 response code.
  221. ; Default Value: pong
  222. ;ping.response = pong
  223.  
  224. ; The timeout for serving a single request after which the worker process will
  225. ; be killed. This option should be used when the 'max_execution_time' ini option
  226. ; does not stop script execution for some reason. A value of '0' means 'off'.
  227. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  228. ; Default Value: 0
  229. ;request_terminate_timeout = 0
  230.  
  231. ; The timeout for serving a single request after which a PHP backtrace will be
  232. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  233. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  234. ; Default Value: 0
  235. ;request_slowlog_timeout = 0
  236.  
  237. ; The log file for slow requests
  238. ; Default Value: not set
  239. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  240. ;slowlog = log/$pool.log.slow
  241.  
  242. ; Set open file descriptor rlimit.
  243. ; Default Value: system defined value
  244. ;rlimit_files = 1024
  245.  
  246. ; Set max core size rlimit.
  247. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  248. ; Default Value: system defined value
  249. ;rlimit_core = 0
  250.  
  251. ; Chroot to this directory at the start. This value must be defined as an
  252. ; absolute path. When this value is not set, chroot is not used.
  253. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
  254. ; of its subdirectories. If the pool prefix is not set, the global prefix
  255. ; will be used instead.
  256. ; Note: chrooting is a great security feature and should be used whenever
  257. ; possible. However, all PHP paths will be relative to the chroot
  258. ; (error_log, sessions.save_path, ...).
  259. ; Default Value: not set
  260. ;chroot =
  261.  
  262. ; Chdir to this directory at the start.
  263. ; Note: relative path can be used.
  264. ; Default Value: current directory or / when chroot
  265. ;chdir = /var/www
  266. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  267. ; stderr will be redirected to /dev/null according to FastCGI specs.
  268. ; Note: on highloaded environement, this can cause some delay in the page
  269. ; process time (several ms).
  270. ; Default Value: no
  271. ;catch_workers_output = yes
  272.  
  273. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  274. ; the current environment.
  275. ; Default Value: clean env
  276. ;env[HOSTNAME] = $HOSTNAME
  277. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  278. ;env[TMP] = /tmp
  279. ;env[TMPDIR] = /tmp
  280. ;env[TEMP] = /tmp
  281.  
  282. ; Additional php.ini defines, specific to this pool of workers. These settings
  283. ; overwrite the values previously defined in the php.ini. The directives are the
  284. ; same as the PHP SAPI:
  285. ; php_value/php_flag - you can set classic ini defines which can
  286. ; be overwritten from PHP call 'ini_set'.
  287. ; php_admin_value/php_admin_flag - these directives won't be overwritten by
  288. ; PHP call 'ini_set'
  289. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  290.  
  291. ; Defining 'extension' will load the corresponding shared extension from
  292. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  293. ; overwrite previously defined php.ini values, but will append the new value
  294. ; instead.
  295.  
  296. ; Note: path INI options can be relative and will be expanded with the prefix
  297. ; (pool, global or /usr/local)
  298. ; Default Value: nothing is defined by default except the values in php.ini and
  299. ; specified at startup with the -d argument
  300. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
  301. ;php_flag[display_errors] = off
  302. ;php_admin_value[error_log] = /var/log/fpm-php.www.log
  303. ;php_admin_flag[log_errors] = on
  304. ;php_admin_value[memory_limit] = 32M
Advertisement
Add Comment
Please, Sign In to add comment