Advertisement
Guest User

Untitled

a guest
Mar 5th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. <?xml version="1.0" ?>
  2. <!-- $FreeBSD: ports/lang/php52/files/php-fpm.conf.sample.in,v 1.2 2012/11/17 05:58:55 svnexp Exp $ -->
  3. <configuration>
  4.  
  5. All relative paths in this config are relative to php's install prefix
  6.  
  7. <section name="global_options">
  8.  
  9. Pid file
  10. <value name="pid_file">/var/run/php-fpm/php-fpm.pid</value>
  11.  
  12. Error log file
  13. <value name="error_log">/var/log/php-fpm/php-fpm.log</value>
  14.  
  15. Log level
  16. <value name="log_level">error</value>
  17.  
  18. When this amount of php processes exited with SIGSEGV or SIGBUS ...
  19. <value name="emergency_restart_threshold">10</value>
  20.  
  21. ... in a less than this interval of time, a graceful restart will be initiated.
  22. Useful to work around accidental curruptions in accelerator's shared memory.
  23. <value name="emergency_restart_interval">1m</value>
  24.  
  25. Time limit on waiting child's reaction on signals from master
  26. <value name="process_control_timeout">5s</value>
  27.  
  28. Set to 'no' to debug fpm
  29. <value name="daemonize">yes</value>
  30.  
  31. </section>
  32.  
  33. <workers>
  34.  
  35. <section name="pool">
  36.  
  37. Name of pool. Used in logs and stats.
  38. <value name="name">default</value>
  39.  
  40. Address to accept fastcgi requests on.
  41. Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
  42. <value name="listen_address">/tmp/php-fpm.sock</value>
  43.  
  44. <value name="listen_options">
  45.  
  46. Set listen(2) backlog
  47. <value name="backlog">-1</value>
  48.  
  49. Set permissions for unix socket, if one used.
  50. In Linux read/write permissions must be set in order to allow connections from web server.
  51. Many BSD-derrived systems allow connections regardless of permissions.
  52. <value name="owner">www</value>
  53. <value name="group">www</value>
  54. <value name="mode">0666</value>
  55. </value>
  56.  
  57. Additional php.ini defines, specific to this pool of workers.
  58. <value name="php_defines">
  59. <!-- <value name="sendmail_path">/usr/sbin/sendmail -t -i</value> -->
  60. <!-- <value name="display_errors">0</value> -->
  61. </value>
  62.  
  63. Unix user of processes
  64. <value name="user">www</value>
  65.  
  66. Unix group of processes
  67. <value name="group">www</value>
  68.  
  69. Process manager settings
  70. <value name="pm">
  71.  
  72. Sets style of controling worker process count.
  73. Valid values are 'static' and 'apache-like'
  74. <value name="style">static</value>
  75.  
  76. Sets the limit on the number of simultaneous requests that will be served.
  77. Equivalent to Apache MaxClients directive.
  78. Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi
  79. Used with any pm_style.
  80. <value name="max_children">5</value>
  81.  
  82. Settings group for 'apache-like' pm style
  83. <value name="apache_like">
  84.  
  85. Sets the number of server processes created on startup.
  86. Used only when 'apache-like' pm_style is selected
  87. <value name="StartServers">20</value>
  88.  
  89. Sets the desired minimum number of idle server processes.
  90. Used only when 'apache-like' pm_style is selected
  91. <value name="MinSpareServers">5</value>
  92.  
  93. Sets the desired maximum number of idle server processes.
  94. Used only when 'apache-like' pm_style is selected
  95. <value name="MaxSpareServers">35</value>
  96.  
  97. </value>
  98.  
  99. </value>
  100.  
  101. The timeout (in seconds) for serving a single request after which the worker process will be terminated
  102. Should be used when 'max_execution_time' ini option does not stop script execution for some reason
  103. '0s' means 'off'
  104. <value name="request_terminate_timeout">0s</value>
  105.  
  106. The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
  107. '0s' means 'off'
  108. <value name="request_slowlog_timeout">0s</value>
  109.  
  110. The log file for slow requests
  111. <value name="slowlog">logs/slow.log</value>
  112.  
  113. Set open file desc rlimit
  114. <value name="rlimit_files">1024</value>
  115.  
  116. Set max core size rlimit
  117. <value name="rlimit_core">0</value>
  118.  
  119. Chroot to this directory at the start, absolute path
  120. <value name="chroot"></value>
  121.  
  122. Chdir to this directory at the start, absolute path
  123. <value name="chdir"></value>
  124.  
  125. Redirect workers' stdout and stderr into main error log.
  126. If not set, they will be redirected to /dev/null, according to FastCGI specs
  127. <value name="catch_workers_output">yes</value>
  128.  
  129. How much requests each process should execute before respawn.
  130. Useful to work around memory leaks in 3rd party libraries.
  131. For endless request processing please specify 0
  132. Equivalent to PHP_FCGI_MAX_REQUESTS
  133. <value name="max_requests">500</value>
  134.  
  135. Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect.
  136. Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+)
  137. Makes sense only with AF_INET listening socket.
  138. <value name="allowed_clients">127.0.0.1</value>
  139.  
  140. Pass environment variables like LD_LIBRARY_PATH
  141. All $VARIABLEs are taken from current environment
  142. <value name="environment">
  143. <value name="HOSTNAME">$HOSTNAME</value>
  144. <value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
  145. <value name="TMP">/tmp</value>
  146. <value name="TMPDIR">/tmp</value>
  147. <value name="TEMP">/tmp</value>
  148. <value name="OSTYPE">$OSTYPE</value>
  149. <value name="MACHTYPE">$MACHTYPE</value>
  150. <value name="MALLOC_CHECK_">2</value>
  151. </value>
  152.  
  153. </section>
  154.  
  155. </workers>
  156.  
  157. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement