Advertisement
Guest User

Untitled

a guest
May 11th, 2012
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.81 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). 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 otherwise
  15. ;include=/etc/php/fpm.d/*.conf
  16.  
  17. ;;;;;;;;;;;;;;;;;;
  18. ; Global Options ;
  19. ;;;;;;;;;;;;;;;;;;
  20.  
  21. [global]
  22. ; Pid file
  23. ; Note: the default prefix is /var
  24. ; Default Value: none
  25. pid = run/php-fpm/php-fpm.pid
  26.  
  27. ; Error log file
  28. ; If it's set to "syslog", log is sent to syslogd instead of being written
  29. ; in a local file.
  30. ; Note: the default prefix is /var
  31. ; Default Value: log/php-fpm.log
  32. ;error_log = log/php-fpm.log
  33.  
  34. ; syslog_facility is used to specify what type of program is logging the
  35. ; message. This lets syslogd specify that messages from different facilities
  36. ; will be handled differently.
  37. ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
  38. ; Default Value: daemon
  39. ;syslog.facility = daemon
  40.  
  41. ; syslog_ident is prepended to every message. If you have multiple FPM
  42. ; instances running on the same server, you can change the default value
  43. ; which must suit common needs.
  44. ; Default Value: php-fpm
  45. ;syslog.ident = php-fpm
  46.  
  47. ; Log level
  48. ; Possible Values: alert, error, warning, notice, debug
  49. ; Default Value: notice
  50. ;log_level = notice
  51.  
  52. ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
  53. ; interval set by emergency_restart_interval then FPM will restart. A value
  54. ; of '0' means 'Off'.
  55. ; Default Value: 0
  56. ;emergency_restart_threshold = 0
  57.  
  58. ; Interval of time used by emergency_restart_interval to determine when
  59. ; a graceful restart will be initiated. This can be useful to work around
  60. ; accidental corruptions in an accelerator's shared memory.
  61. ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
  62. ; Default Unit: seconds
  63. ; Default Value: 0
  64. ;emergency_restart_interval = 0
  65.  
  66. ; Time limit for child processes to wait for a reaction on signals from master.
  67. ; Available units: s(econds), m(inutes), h(ours), or d(ays)
  68. ; Default Unit: seconds
  69. ; Default Value: 0
  70. ;process_control_timeout = 0
  71.  
  72. ; The maximum number of processes FPM will fork. This has been design to control
  73. ; the global number of processes when using dynamic PM within a lot of pools.
  74. ; Use it with caution.
  75. ; Note: A value of 0 indicates no limit
  76. ; Default Value: 0
  77. ; process.max = 128
  78.  
  79. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
  80. ; Default Value: yes
  81. ;daemonize = yes
  82.  
  83. ; Set open file descriptor rlimit for the master process.
  84. ; Default Value: system defined value
  85. ;rlimit_files = 1024
  86.  
  87. ; Set max core size rlimit for the master process.
  88. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  89. ; Default Value: system defined value
  90. ;rlimit_core = 0
  91.  
  92. ; Specify the event mechanism FPM will use. The following is available:
  93. ; - select (any POSIX os)
  94. ; - poll (any POSIX os)
  95. ; - epoll (linux >= 2.5.44)
  96. ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
  97. ; - /dev/poll (Solaris >= 7)
  98. ; - port (Solaris >= 10)
  99. ; Default Value: not set (auto detection)
  100. ; events.mechanism = epoll
  101.  
  102. ;;;;;;;;;;;;;;;;;;;;
  103. ; Pool Definitions ;
  104. ;;;;;;;;;;;;;;;;;;;;
  105.  
  106. ; Multiple pools of child processes may be started with different listening
  107. ; ports and different management options. The name of the pool will be
  108. ; used in logs and stats. There is no limitation on the number of pools which
  109. ; FPM can handle. Your system will tell you anyway :)
  110.  
  111. ; Start a new pool named 'www'.
  112. ; the variable $pool can we used in any directive and will be replaced by the
  113. ; pool name ('www' here)
  114. [www]
  115.  
  116. ; Per pool prefix
  117. ; It only applies on the following directives:
  118. ; - 'slowlog'
  119. ; - 'listen' (unixsocket)
  120. ; - 'chroot'
  121. ; - 'chdir'
  122. ; - 'php_values'
  123. ; - 'php_admin_values'
  124. ; When not set, the global prefix (or /usr) applies instead.
  125. ; Note: This directive can also be relative to the global prefix.
  126. ; Default Value: none
  127. ;prefix = /path/to/pools/$pool
  128.  
  129. ; Unix user/group of processes
  130. ; Note: The user is mandatory. If the group is not set, the default user's group
  131. ; will be used.
  132. user = http
  133. group = http
  134.  
  135. ; The address on which to accept FastCGI requests.
  136. ; Valid syntaxes are:
  137. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
  138. ; a specific port;
  139. ; 'port' - to listen on a TCP socket to all addresses on a
  140. ; specific port;
  141. ; '/path/to/unix/socket' - to listen on a unix socket.
  142. ; Note: This value is mandatory.
  143. listen = 127.0.0.1:9000
  144. ;listen = /var/run/php-fpm/php-fpm.sock
  145.  
  146. ; Set listen(2) backlog.
  147. ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
  148. ;listen.backlog = 128
  149.  
  150. ; Set permissions for unix socket, if one is used. In Linux, read/write
  151. ; permissions must be set in order to allow connections from a web server. Many
  152. ; BSD-derived systems allow connections regardless of permissions.
  153. ; Default Values: user and group are set as the running user
  154. ; mode is set to 0666
  155. listen.owner = http
  156. listen.group = http
  157. listen.mode = 0660
  158.  
  159. ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
  160. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  161. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  162. ; must be separated by a comma. If this value is left blank, connections will be
  163. ; accepted from any ip address.
  164. ; Default Value: any
  165. ;listen.allowed_clients = 127.0.0.1
  166.  
  167. ; Choose how the process manager will control the number of child processes.
  168. ; Possible Values:
  169. ; static - a fixed number (pm.max_children) of child processes;
  170. ; dynamic - the number of child processes are set dynamically based on the
  171. ; following directives. With this process management, there will be
  172. ; always at least 1 children.
  173. ; pm.max_children - the maximum number of children that can
  174. ; be alive at the same time.
  175. ; pm.start_servers - the number of children created on startup.
  176. ; pm.min_spare_servers - the minimum number of children in 'idle'
  177. ; state (waiting to process). If the number
  178. ; of 'idle' processes is less than this
  179. ; number then some children will be created.
  180. ; pm.max_spare_servers - the maximum number of children in 'idle'
  181. ; state (waiting to process). If the number
  182. ; of 'idle' processes is greater than this
  183. ; number then some children will be killed.
  184. ; ondemand - no children are created at startup. Children will be forked when
  185. ; new requests will connect. The following parameter are used:
  186. ; pm.max_children - the maximum number of children that
  187. ; can be alive at the same time.
  188. ; pm.process_idle_timeout - The number of seconds after which
  189. ; an idle process will be killed.
  190. ; Note: This value is mandatory.
  191. pm = dynamic
  192.  
  193. ; The number of child processes to be created when pm is set to 'static' and the
  194. ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
  195. ; This value sets the limit on the number of simultaneous requests that will be
  196. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  197. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  198. ; CGI. The below defaults are based on a server without much resources. Don't
  199. ; forget to tweak pm.* to fit your needs.
  200. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
  201. ; Note: This value is mandatory.
  202. pm.max_children = 5
  203.  
  204. ; The number of child processes created on startup.
  205. ; Note: Used only when pm is set to 'dynamic'
  206. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  207. pm.start_servers = 2
  208.  
  209. ; The desired minimum number of idle server processes.
  210. ; Note: Used only when pm is set to 'dynamic'
  211. ; Note: Mandatory when pm is set to 'dynamic'
  212. pm.min_spare_servers = 1
  213.  
  214. ; The desired maximum number of idle server processes.
  215. ; Note: Used only when pm is set to 'dynamic'
  216. ; Note: Mandatory when pm is set to 'dynamic'
  217. pm.max_spare_servers = 3
  218.  
  219. ; The number of seconds after which an idle process will be killed.
  220. ; Note: Used only when pm is set to 'ondemand'
  221. ; Default Value: 10s
  222. ;pm.process_idle_timeout = 10s;
  223.  
  224. ; The number of requests each child process should execute before respawning.
  225. ; This can be useful to work around memory leaks in 3rd party libraries. For
  226. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  227. ; Default Value: 0
  228. ;pm.max_requests = 500
  229.  
  230. ; The URI to view the FPM status page. If this value is not set, no URI will be
  231. ; recognized as a status page. It shows the following informations:
  232. ; pool - the name of the pool;
  233. ; process manager - static, dynamic or ondemand;
  234. ; start time - the date and time FPM has started;
  235. ; start since - number of seconds since FPM has started;
  236. ; accepted conn - the number of request accepted by the pool;
  237. ; listen queue - the number of request in the queue of pending
  238. ; connections (see backlog in listen(2));
  239. ; max listen queue - the maximum number of requests in the queue
  240. ; of pending connections since FPM has started;
  241. ; listen queue len - the size of the socket queue of pending connections;
  242. ; idle processes - the number of idle processes;
  243. ; active processes - the number of active processes;
  244. ; total processes - the number of idle + active processes;
  245. ; max active processes - the maximum number of active processes since FPM
  246. ; has started;
  247. ; max children reached - number of times, the process limit has been reached,
  248. ; when pm tries to start more children (works only for
  249. ; pm 'dynamic' and 'ondemand');
  250. ; Value are updated in real time.
  251. ; Example output:
  252. ; pool: www
  253. ; process manager: static
  254. ; start time: 01/Jul/2011:17:53:49 +0200
  255. ; start since: 62636
  256. ; accepted conn: 190460
  257. ; listen queue: 0
  258. ; max listen queue: 1
  259. ; listen queue len: 42
  260. ; idle processes: 4
  261. ; active processes: 11
  262. ; total processes: 15
  263. ; max active processes: 12
  264. ; max children reached: 0
  265. ;
  266. ; By default the status page output is formatted as text/plain. Passing either
  267. ; 'html', 'xml' or 'json' in the query string will return the corresponding
  268. ; output syntax. Example:
  269. ; http://www.foo.bar/status
  270. ; http://www.foo.bar/status?json
  271. ; http://www.foo.bar/status?html
  272. ; http://www.foo.bar/status?xml
  273. ;
  274. ; By default the status page only outputs short status. Passing 'full' in the
  275. ; query string will also return status for each pool process.
  276. ; Example:
  277. ; http://www.foo.bar/status?full
  278. ; http://www.foo.bar/status?json&full
  279. ; http://www.foo.bar/status?html&full
  280. ; http://www.foo.bar/status?xml&full
  281. ; The Full status returns for each process:
  282. ; pid - the PID of the process;
  283. ; state - the state of the process (Idle, Running, ...);
  284. ; start time - the date and time the process has started;
  285. ; start since - the number of seconds since the process has started;
  286. ; requests - the number of requests the process has served;
  287. ; request duration - the duration in ยตs of the requests;
  288. ; request method - the request method (GET, POST, ...);
  289. ; request URI - the request URI with the query string;
  290. ; content length - the content length of the request (only with POST);
  291. ; user - the user (PHP_AUTH_USER) (or '-' if not set);
  292. ; script - the main script called (or '-' if not set);
  293. ; last request cpu - the %cpu the last request consumed
  294. ; it's always 0 if the process is not in Idle state
  295. ; because CPU calculation is done when the request
  296. ; processing has terminated;
  297. ; last request memory - the max amount of memory the last request consumed
  298. ; it's always 0 if the process is not in Idle state
  299. ; because memory calculation is done when the request
  300. ; processing has terminated;
  301. ; If the process is in Idle state, then informations are related to the
  302. ; last request the process has served. Otherwise informations are related to
  303. ; the current request being served.
  304. ; Example output:
  305. ; ************************
  306. ; pid: 31330
  307. ; state: Running
  308. ; start time: 01/Jul/2011:17:53:49 +0200
  309. ; start since: 63087
  310. ; requests: 12808
  311. ; request duration: 1250261
  312. ; request method: GET
  313. ; request URI: /test_mem.php?N=10000
  314. ; content length: 0
  315. ; user: -
  316. ; script: /home/fat/web/docs/php/test_mem.php
  317. ; last request cpu: 0.00
  318. ; last request memory: 0
  319. ;
  320. ; Note: There is a real-time FPM status monitoring sample web page available
  321. ; It's available in: ${prefix}/share/fpm/status.html
  322. ;
  323. ; Note: The value must start with a leading slash (/). The value can be
  324. ; anything, but it may not be a good idea to use the .php extension or it
  325. ; may conflict with a real PHP file.
  326. ; Default Value: not set
  327. ;pm.status_path = /status
  328.  
  329. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  330. ; URI will be recognized as a ping page. This could be used to test from outside
  331. ; that FPM is alive and responding, or to
  332. ; - create a graph of FPM availability (rrd or such);
  333. ; - remove a server from a group if it is not responding (load balancing);
  334. ; - trigger alerts for the operating team (24/7).
  335. ; Note: The value must start with a leading slash (/). The value can be
  336. ; anything, but it may not be a good idea to use the .php extension or it
  337. ; may conflict with a real PHP file.
  338. ; Default Value: not set
  339. ;ping.path = /ping
  340.  
  341. ; This directive may be used to customize the response of a ping request. The
  342. ; response is formatted as text/plain with a 200 response code.
  343. ; Default Value: pong
  344. ;ping.response = pong
  345.  
  346. ; The access log file
  347. ; Default: not set
  348. ;access.log = log/$pool.access.log
  349.  
  350. ; The access log format.
  351. ; The following syntax is allowed
  352. ; %%: the '%' character
  353. ; %C: %CPU used by the request
  354. ; it can accept the following format:
  355. ; - %{user}C for user CPU only
  356. ; - %{system}C for system CPU only
  357. ; - %{total}C for user + system CPU (default)
  358. ; %d: time taken to serve the request
  359. ; it can accept the following format:
  360. ; - %{seconds}d (default)
  361. ; - %{miliseconds}d
  362. ; - %{mili}d
  363. ; - %{microseconds}d
  364. ; - %{micro}d
  365. ; %e: an environment variable (same as $_ENV or $_SERVER)
  366. ; it must be associated with embraces to specify the name of the env
  367. ; variable. Some exemples:
  368. ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
  369. ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
  370. ; %f: script filename
  371. ; %l: content-length of the request (for POST request only)
  372. ; %m: request method
  373. ; %M: peak of memory allocated by PHP
  374. ; it can accept the following format:
  375. ; - %{bytes}M (default)
  376. ; - %{kilobytes}M
  377. ; - %{kilo}M
  378. ; - %{megabytes}M
  379. ; - %{mega}M
  380. ; %n: pool name
  381. ; %o: ouput header
  382. ; it must be associated with embraces to specify the name of the header:
  383. ; - %{Content-Type}o
  384. ; - %{X-Powered-By}o
  385. ; - %{Transfert-Encoding}o
  386. ; - ....
  387. ; %p: PID of the child that serviced the request
  388. ; %P: PID of the parent of the child that serviced the request
  389. ; %q: the query string
  390. ; %Q: the '?' character if query string exists
  391. ; %r: the request URI (without the query string, see %q and %Q)
  392. ; %R: remote IP address
  393. ; %s: status (response code)
  394. ; %t: server time the request was received
  395. ; it can accept a strftime(3) format:
  396. ; %d/%b/%Y:%H:%M:%S %z (default)
  397. ; %T: time the log has been written (the request has finished)
  398. ; it can accept a strftime(3) format:
  399. ; %d/%b/%Y:%H:%M:%S %z (default)
  400. ; %u: remote user
  401. ;
  402. ; Default: "%R - %u %t \"%m %r\" %s"
  403. ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
  404.  
  405. ; The log file for slow requests
  406. ; Default Value: not set
  407. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  408. ;slowlog = log/$pool.log.slow
  409.  
  410. ; The timeout for serving a single request after which a PHP backtrace will be
  411. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  412. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  413. ; Default Value: 0
  414. ;request_slowlog_timeout = 0
  415.  
  416. ; The timeout for serving a single request after which the worker process will
  417. ; be killed. This option should be used when the 'max_execution_time' ini option
  418. ; does not stop script execution for some reason. A value of '0' means 'off'.
  419. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  420. ; Default Value: 0
  421. ;request_terminate_timeout = 0
  422.  
  423. ; Set open file descriptor rlimit.
  424. ; Default Value: system defined value
  425. ;rlimit_files = 1024
  426.  
  427. ; Set max core size rlimit.
  428. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  429. ; Default Value: system defined value
  430. ;rlimit_core = 0
  431.  
  432. ; Chroot to this directory at the start. This value must be defined as an
  433. ; absolute path. When this value is not set, chroot is not used.
  434. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
  435. ; of its subdirectories. If the pool prefix is not set, the global prefix
  436. ; will be used instead.
  437. ; Note: chrooting is a great security feature and should be used whenever
  438. ; possible. However, all PHP paths will be relative to the chroot
  439. ; (error_log, sessions.save_path, ...).
  440. ; Default Value: not set
  441. ;chroot =
  442.  
  443. ; Chdir to this directory at the start.
  444. ; Note: relative path can be used.
  445. ; Default Value: current directory or / when chroot
  446. ;chdir = /srv/http
  447.  
  448. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  449. ; stderr will be redirected to /dev/null according to FastCGI specs.
  450. ; Note: on highloaded environement, this can cause some delay in the page
  451. ; process time (several ms).
  452. ; Default Value: no
  453. ;catch_workers_output = yes
  454.  
  455. ; Limits the extensions of the main script FPM will allow to parse. This can
  456. ; prevent configuration mistakes on the web server side. You should only limit
  457. ; FPM to .php extensions to prevent malicious users to use other extensions to
  458. ; exectute php code.
  459. ; Note: set an empty value to allow all extensions.
  460. ; Default Value: .php
  461. ;security.limit_extensions = .php .php3 .php4 .php5
  462.  
  463. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  464. ; the current environment.
  465. ; Default Value: clean env
  466. ;env[HOSTNAME] = $HOSTNAME
  467. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  468. ;env[TMP] = /tmp
  469. ;env[TMPDIR] = /tmp
  470. ;env[TEMP] = /tmp
  471.  
  472. ; Additional php.ini defines, specific to this pool of workers. These settings
  473. ; overwrite the values previously defined in the php.ini. The directives are the
  474. ; same as the PHP SAPI:
  475. ; php_value/php_flag - you can set classic ini defines which can
  476. ; be overwritten from PHP call 'ini_set'.
  477. ; php_admin_value/php_admin_flag - these directives won't be overwritten by
  478. ; PHP call 'ini_set'
  479. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  480.  
  481. ; Defining 'extension' will load the corresponding shared extension from
  482. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  483. ; overwrite previously defined php.ini values, but will append the new value
  484. ; instead.
  485.  
  486. ; Note: path INI options can be relative and will be expanded with the prefix
  487. ; (pool, global or /usr)
  488.  
  489. ; Default Value: nothing is defined by default except the values in php.ini and
  490. ; specified at startup with the -d argument
  491. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
  492. ;php_flag[display_errors] = off
  493. ;php_admin_value[error_log] = /var/log/fpm-php.www.log
  494. ;php_admin_flag[log_errors] = on
  495. ;php_admin_value[memory_limit] = 32M
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement