php-fpm.conf 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ;;;;;;;;;;;;;;;;;;;;;
  2. ; FPM Configuration ;
  3. ;;;;;;;;;;;;;;;;;;;;;
  4. ; All relative paths in this configuration file are relative to PHP's install
  5. ; prefix (/usr). This prefix can be dynamically changed by using the
  6. ; '-p' argument from the command line.
  7. ; Include one or more files. If glob(3) exists, it is used to include a bunch of
  8. ; files from a glob(3) pattern. This directive can be used everywhere in the
  9. ; file.
  10. ; Relative path can also be used. They will be prefixed by:
  11. ; - the global prefix if it's been set (-p argument)
  12. ; - /usr otherwise
  13. ;include=etc/fpm.d/*.conf
  14. ;;;;;;;;;;;;;;;;;;
  15. ; Global Options ;
  16. ;;;;;;;;;;;;;;;;;;
  17. [global]
  18. ; Pid file
  19. ; Note: the default prefix is /var
  20. ; Default Value: none
  21. ;pid = run/php-fpm.pid
  22. ; Error log file
  23. ; If it's set to "syslog", log is sent to syslogd instead of being written
  24. ; in a local file.
  25. ; Note: the default prefix is /var
  26. ; Default Value: log/php-fpm.log
  27. ;error_log = log/php-fpm.log
  28. ; syslog_facility is used to specify what type of program is logging the
  29. ; message. This lets syslogd specify that messages from different facilities
  30. ; will be handled differently.
  31. ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
  32. ; Default Value: daemon
  33. ;syslog.facility = daemon
  34. ; syslog_ident is prepended to every message. If you have multiple FPM
  35. ; instances running on the same server, you can change the default value
  36. ; which must suit common needs.
  37. ; Default Value: php-fpm
  38. ;syslog.ident = php-fpm
  39. ; Log level
  40. ; Possible Values: alert, error, warning, notice, debug
  41. ; Default Value: notice
  42. ;log_level = notice
  43. ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
  44. ; interval set by emergency_restart_interval then FPM will restart. A value
  45. ; of '0' means 'Off'.
  46. ; Default Value: 0
  47. ;emergency_restart_threshold = 0
  48. ; Interval of time used by emergency_restart_interval to determine when
  49. ; a graceful restart will be initiated. This can be useful to work around
  50. ; accidental corruptions in an accelerator's shared memory.
  51. ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
  52. ; Default Unit: seconds
  53. ; Default Value: 0
  54. ;emergency_restart_interval = 0
  55. ; Time limit for child processes to wait for a reaction on signals from master.
  56. ; Available units: s(econds), m(inutes), h(ours), or d(ays)
  57. ; Default Unit: seconds
  58. ; Default Value: 0
  59. ;process_control_timeout = 0
  60. ; The maximum number of processes FPM will fork. This has been design to control
  61. ; the global number of processes when using dynamic PM within a lot of pools.
  62. ; Use it with caution.
  63. ; Note: A value of 0 indicates no limit
  64. ; Default Value: 0
  65. ; process.max = 128
  66. ; Specify the nice(2) priority to apply to the master process (only if set)
  67. ; The value can vary from -19 (highest priority) to 20 (lower priority)
  68. ; Note: - It will only work if the FPM master process is launched as root
  69. ; - The pool process will inherit the master process priority
  70. ; unless it specified otherwise
  71. ; Default Value: no set
  72. ; process.priority = -19
  73. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
  74. ; Default Value: yes
  75. ;daemonize = yes
  76. ; Set open file descriptor rlimit for the master process.
  77. ; Default Value: system defined value
  78. ;rlimit_files = 1024
  79. ; Set max core size rlimit for the master process.
  80. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  81. ; Default Value: system defined value
  82. ;rlimit_core = 0
  83. ; Specify the event mechanism FPM will use. The following is available:
  84. ; - select (any POSIX os)
  85. ; - poll (any POSIX os)
  86. ; - epoll (linux >= 2.5.44)
  87. ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
  88. ; - /dev/poll (Solaris >= 7)
  89. ; - port (Solaris >= 10)
  90. ; Default Value: not set (auto detection)
  91. ;events.mechanism = epoll
  92. ; When FPM is build with systemd integration, specify the interval,
  93. ; in second, between health report notification to systemd.
  94. ; Set to 0 to disable.
  95. ; Available Units: s(econds), m(inutes), h(ours)
  96. ; Default Unit: seconds
  97. ; Default value: 10
  98. ;systemd_interval = 10
  99. ;;;;;;;;;;;;;;;;;;;;
  100. ; Pool Definitions ;
  101. ;;;;;;;;;;;;;;;;;;;;
  102. ; Multiple pools of child processes may be started with different listening
  103. ; ports and different management options. The name of the pool will be
  104. ; used in logs and stats. There is no limitation on the number of pools which
  105. ; FPM can handle. Your system will tell you anyway :)
  106. ; Start a new pool named 'www'.
  107. ; the variable $pool can we used in any directive and will be replaced by the
  108. ; pool name ('www' here)
  109. [www]
  110. user = www-data
  111. group = www-data
  112. #listen = /var/run/php-fcgi.sock
  113. listen = 127.0.0.1:9099
  114. pm = static
  115. pm.max_children = 3
  116. chdir = /