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 dynamically 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 argument)
  14. ; - /usr otherwise
  15. ;include=etc/fpm.d/*.conf #php-fpm包含子配置文件路径(如果是其他路径,需要打开此功能)
  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.pid 去掉注释,设置进程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 修改为log_level = error 设置日志为只记录错误的日志
  51. alert(必须立即处理), error(错误情况), warning(警告情况), notice(一般重要信息), debug(调试信息). 默认: notice.
  52.  
  53. ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
  54. ; interval set by emergency_restart_interval then FPM will restart. A value
  55. ; of '0' means 'Off'.
  56. ; Default Value: 0 表示在emergency_restart_interval所设值内出现SIGSEGV或者SIGBUS错误的php-cgi进程数如果超过
  57. ;emergency_restart_threshold = 0 emergency_restart_threshold个,php-fpm就会优雅重启。这两个选项一般保持默认值。
  58.  
  59. ; Interval of time used by emergency_restart_interval to determine when
  60. ; a graceful restart will be initiated. This can be useful to work around
  61. ; accidental corruptions in an accelerator's shared memory.
  62. ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
  63. ; Default Unit: seconds
  64. ; Default Value: 0
  65. ;emergency_restart_interval = 0
  66.  
  67. ; Time limit for child processes to wait for a reaction on signals from master.
  68. ; Available units: s(econds), m(inutes), h(ours), or d(ays)
  69. ; Default Unit: seconds
  70. ; Default Value: 0
  71. ;process_control_timeout = 0
  72. 设置子进程接受主进程复用信号的超时时间. 可用单位: s(秒), m(分), h(小时), 或者 d(天) 默认单位: s(秒). 默认值: 0.
  73.  
  74. ; The maximum number of processes FPM will fork. This has been design to control
  75. ; the global number of processes when using dynamic PM within a lot of pools.
  76. ; Use it with caution.
  77. ; Note: A value of 0 indicates no limit
  78. ; Default Value: 0
  79. ; process.max = 128
  80.  
  81. ; Specify the nice(2) priority to apply to the master process (only if set)
  82. ; The value can vary from -19 (highest priority) to 20 (lower priority)
  83. ; Note: - It will only work if the FPM master process is launched as root
  84. ; - The pool process will inherit the master process priority
  85. ; unless it specified otherwise
  86. ; Default Value: no set
  87. ; process.priority = -19
  88.  
  89. ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
  90. ; Default Value: yes
  91. ;daemonize = yes 是否开启守护进程模式,默认是开启
  92.  
  93. ; Set open file descriptor rlimit for the master process. 调整fcgi此进程最大的文件描述符
  94. ; Default Value: system defined value
  95. rlimit_files = 1024 去掉注释,调整数字为32768或更大
  96.  
  97. ; Set max core size rlimit for the master process.
  98. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  99. ; Default Value: system defined value
  100. ;rlimit_core = 0
  101.  
  102. ; Specify the event mechanism FPM will use. The following is available:
  103. ; - select (any POSIX os)
  104. ; - poll (any POSIX os)
  105. ; - epoll (linux >= 2.5.44)
  106. ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
  107. ; - /dev/poll (Solaris >= 7)
  108. ; - port (Solaris >= 10)
  109. ; Default Value: not set (auto detection)
  110. events.mechanism = epoll 打开此功能
  111.  
  112. ; When FPM is build with systemd integration, specify the interval,
  113. ; in second, between health report notification to systemd.
  114. ; Set to 0 to disable.
  115. ; Available Units: s(econds), m(inutes), h(ours)
  116. ; Default Unit: seconds
  117. ; Default value: 10
  118. ;systemd_interval = 10
  119.  
  120. ;;;;;;;;;;;;;;;;;;;;
  121. ; Pool Definitions ;
  122. ;;;;;;;;;;;;;;;;;;;;
  123.  
  124. ; Multiple pools of child processes may be started with different listening
  125. ; ports and different management options. The name of the pool will be
  126. ; used in logs and stats. There is no limitation on the number of pools which
  127. ; FPM can handle. Your system will tell you anyway :)
  128.  
  129. ; Start a new pool named 'www'.
  130. ; the variable $pool can we used in any directive and will be replaced by the
  131. ; pool name ('www' here)
  132. [www]
  133.  
  134. ; Per pool prefix
  135. ; It only applies on the following directives:
  136. ; - 'access.log'
  137. ; - 'slowlog'
  138. ; - 'listen' (unixsocket)
  139. ; - 'chroot'
  140. ; - 'chdir'
  141. ; - 'php_values'
  142. ; - 'php_admin_values'
  143. ; When not set, the global prefix (or /usr) applies instead.
  144. ; Note: This directive can also be relative to the global prefix.
  145. ; Default Value: none
  146. ;prefix = /path/to/pools/$pool
  147.  
  148. ; Unix user/group of processes
  149. ; Note: The user is mandatory. If the group is not set, the default user's group
  150. ; will be used.
  151. user = nginx 进程运行的用户和用户组,要和nginx一致
  152. group = nginx
  153.  
  154. ; The address on which to accept FastCGI requests.
  155. ; Valid syntaxes are:
  156. ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
  157. ; a specific port;
  158. ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
  159. ; a specific port;
  160. ; 'port' - to listen on a TCP socket to all IPv4 addresses on a
  161. ; specific port;
  162. ; '[::]:port' - to listen on a TCP socket to all addresses
  163. ; (IPv6 and IPv4-mapped) on a specific port;
  164. ; '/path/to/unix/socket' - to listen on a unix socket.
  165. ; Note: This value is mandatory.
  166. listen = 127.0.0.1:9000 服务器侦听的端口
  167.  
  168. ; Set listen(2) backlog.
  169. ; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
  170. ;listen.backlog = 65535
  171.  
  172. ; Set permissions for unix socket, if one is used. In Linux, read/write
  173. ; permissions must be set in order to allow connections from a web server. Many
  174. ; BSD-derived systems allow connections regardless of permissions.
  175. ; Default Values: user and group are set as the running user
  176. ; mode is set to 0660
  177. listen.owner = nginx fcgi进程使用的用户和组,这里修改为自己添加运行nginx和php的用户,要和nginx一致
  178. listen.group = nginx (如果不一致会出现权限问题)
  179. ;listen.mode = 0660
  180. ; When POSIX Access Control Lists are supported you can set them using
  181. ; these options, value is a comma separated list of user/group names.
  182. ; When set, listen.owner and listen.group are ignored
  183. ;listen.acl_users =
  184. ;listen.acl_groups =
  185.  
  186. ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
  187. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  188. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  189. ; must be separated by a comma. If this value is left blank, connections will be
  190. ; accepted from any ip address.
  191. ; Default Value: any
  192. ;listen.allowed_clients = 127.0.0.1
  193.  
  194. ; Specify the nice(2) priority to apply to the pool processes (only if set)
  195. ; The value can vary from -19 (highest priority) to 20 (lower priority)
  196. ; Note: - It will only work if the FPM master process is launched as root
  197. ; - The pool processes will inherit the master process priority
  198. ; unless it specified otherwise
  199. ; Default Value: no set
  200. ; process.priority = -19
  201.  
  202. ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
  203. ; or group is differrent than the master process user. It allows to create process
  204. ; core dump and ptrace the process for the pool user.
  205. ; Default Value: no
  206. ; process.dumpable = yes
  207.  
  208. ; Choose how the process manager will control the number of child processes.
  209. ; Possible Values:
  210. ; static - a fixed number (pm.max_children) of child processes;
  211. ; dynamic - the number of child processes are set dynamically based on the
  212. ; following directives. With this process management, there will be
  213. ; always at least 1 children.
  214. ; pm.max_children - the maximum number of children that can
  215. ; be alive at the same time.
  216. ; pm.start_servers - the number of children created on startup.
  217. ; pm.min_spare_servers - the minimum number of children in 'idle'
  218. ; state (waiting to process). If the number
  219. ; of 'idle' processes is less than this
  220. ; number then some children will be created.
  221. ; pm.max_spare_servers - the maximum number of children in 'idle'
  222. ; state (waiting to process). If the number
  223. ; of 'idle' processes is greater than this
  224. ; number then some children will be killed.
  225. ; ondemand - no children are created at startup. Children will be forked when
  226. ; new requests will connect. The following parameter are used:
  227. ; pm.max_children - the maximum number of children that
  228. ; can be alive at the same time.
  229. ; pm.process_idle_timeout - The number of seconds after which
  230. ; an idle process will be killed.
  231. ; Note: This value is mandatory.
  232. pm = dynamic
  233.  
  234. ; The number of child processes to be created when pm is set to 'static' and the
  235. ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
  236. ; This value sets the limit on the number of simultaneous requests that will be
  237. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  238. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  239. ; CGI. The below defaults are based on a server without much resources. Don't
  240. ; forget to tweak pm.* to fit your needs.
  241. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
  242. ; Note: This value is mandatory.
  243. pm.max_children = 5 这里调整为1024或更大(这里是设置最大子进程的数量)
  244.  
  245. ; The number of child processes created on startup.
  246. ; Note: Used only when pm is set to 'dynamic'
  247. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  248. pm.start_servers = 2 这里适当调整为16(开始启动的时候可以有几个子进程)
  249.  
  250. ; The desired minimum number of idle server processes.
  251. ; Note: Used only when pm is set to 'dynamic'
  252. ; Note: Mandatory when pm is set to 'dynamic'
  253. pm.min_spare_servers = 1 这里适当调整为5(最少要保留多少个子进程,空闲进程小于此值则自动创建新的子进程)
  254.  
  255. ; The desired maximum number of idle server processes.
  256. ; Note: Used only when pm is set to 'dynamic'
  257. ; Note: Mandatory when pm is set to 'dynamic'
  258. pm.max_spare_servers = 3 这里适当调整为20(最大可以保留多个子进程,大于此数值会被清理掉)
  259.  
  260. ; The number of seconds after which an idle process will be killed.
  261. ; Note: Used only when pm is set to 'ondemand'
  262. ; Default Value: 10s
  263. pm.process_idle_timeout = 10s; 这里适当调整为10s或15s(空闲的进程在几秒内没操作会被杀掉)
  264.  
  265. ; The number of requests each child process should execute before respawning.
  266. ; This can be useful to work around memory leaks in 3rd party libraries. For
  267. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  268. ; Default Value: 0
  269. pm.max_requests = 500 这里调整请求为2048(每个子进程最大服务多少个请求后退出)
  270.  
  271. ; The URI to view the FPM status page. If this value is not set, no URI will be
  272. ; recognized as a status page. It shows the following informations:
  273. ; pool - the name of the pool;
  274. ; process manager - static, dynamic or ondemand;
  275. ; start time - the date and time FPM has started;
  276. ; start since - number of seconds since FPM has started;
  277. ; accepted conn - the number of request accepted by the pool;
  278. ; listen queue - the number of request in the queue of pending
  279. ; connections (see backlog in listen(2));
  280. ; max listen queue - the maximum number of requests in the queue
  281. ; of pending connections since FPM has started;
  282. ; listen queue len - the size of the socket queue of pending connections;
  283. ; idle processes - the number of idle processes;
  284. ; active processes - the number of active processes;
  285. ; total processes - the number of idle + active processes;
  286. ; max active processes - the maximum number of active processes since FPM
  287. ; has started;
  288. ; max children reached - number of times, the process limit has been reached,
  289. ; when pm tries to start more children (works only for
  290. ; pm 'dynamic' and 'ondemand');
  291. ; Value are updated in real time.
  292. ; Example output:
  293. ; pool: www
  294. ; process manager: static
  295. ; start time: 01/Jul/2011:17:53:49 +0200
  296. ; start since: 62636
  297. ; accepted conn: 190460
  298. ; listen queue: 0
  299. ; max listen queue: 1
  300. ; listen queue len: 42
  301. ; idle processes: 4
  302. ; active processes: 11
  303. ; total processes: 15
  304. ; max active processes: 12
  305. ; max children reached: 0
  306. ;
  307. ; By default the status page output is formatted as text/plain. Passing either
  308. ; 'html', 'xml' or 'json' in the query string will return the corresponding
  309. ; output syntax. Example:
  310. ; http://www.foo.bar/status
  311. ; http://www.foo.bar/status?json
  312. ; http://www.foo.bar/status?html
  313. ; http://www.foo.bar/status?xml
  314. ;
  315. ; By default the status page only outputs short status. Passing 'full' in the
  316. ; query string will also return status for each pool process.
  317. ; Example:
  318. ; http://www.foo.bar/status?full
  319. ; http://www.foo.bar/status?json&full
  320. ; http://www.foo.bar/status?html&full
  321. ; http://www.foo.bar/status?xml&full
  322. ; The Full status returns for each process:
  323. ; pid - the PID of the process;
  324. ; state - the state of the process (Idle, Running, ...);
  325. ; start time - the date and time the process has started;
  326. ; start since - the number of seconds since the process has started;
  327. ; requests - the number of requests the process has served;
  328. ; request duration - the duration in µs of the requests;
  329. ; request method - the request method (GET, POST, ...);
  330. ; request URI - the request URI with the query string;
  331. ; content length - the content length of the request (only with POST);
  332. ; user - the user (PHP_AUTH_USER) (or '-' if not set);
  333. ; script - the main script called (or '-' if not set);
  334. ; last request cpu - the %cpu the last request consumed
  335. ; it's always 0 if the process is not in Idle state
  336. ; because CPU calculation is done when the request
  337. ; processing has terminated;
  338. ; last request memory - the max amount of memory the last request consumed
  339. ; it's always 0 if the process is not in Idle state
  340. ; because memory calculation is done when the request
  341. ; processing has terminated;
  342. ; If the process is in Idle state, then informations are related to the
  343. ; last request the process has served. Otherwise informations are related to
  344. ; the current request being served.
  345. ; Example output:
  346. ; ************************
  347. ; pid: 31330
  348. ; state: Running
  349. ; start time: 01/Jul/2011:17:53:49 +0200
  350. ; start since: 63087
  351. ; requests: 12808
  352. ; request duration: 1250261
  353. ; request method: GET
  354. ; request URI: /test_mem.php?N=10000
  355. ; content length: 0
  356. ; user: -
  357. ; script: /home/fat/web/docs/php/test_mem.php
  358. ; last request cpu: 0.00
  359. ; last request memory: 0
  360. ;
  361. ; Note: There is a real-time FPM status monitoring sample web page available
  362. ; It's available in: /usr/share/fpm/status.html
  363. ;
  364. ; Note: The value must start with a leading slash (/). The value can be
  365. ; anything, but it may not be a good idea to use the .php extension or it
  366. ; may conflict with a real PHP file.
  367. ; Default Value: not set
  368. ;pm.status_path = /status
  369.  
  370. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  371. ; URI will be recognized as a ping page. This could be used to test from outside
  372. ; that FPM is alive and responding, or to
  373. ; - create a graph of FPM availability (rrd or such);
  374. ; - remove a server from a group if it is not responding (load balancing);
  375. ; - trigger alerts for the operating team (24/7).
  376. ; Note: The value must start with a leading slash (/). The value can be
  377. ; anything, but it may not be a good idea to use the .php extension or it
  378. ; may conflict with a real PHP file.
  379. ; Default Value: not set
  380. ;ping.path = /ping
  381.  
  382. ; This directive may be used to customize the response of a ping request. The
  383. ; response is formatted as text/plain with a 200 response code.
  384. ; Default Value: pong
  385. ;ping.response = pong
  386.  
  387. ; The access log file
  388. ; Default: not set
  389. ;access.log = log/$pool.access.log
  390.  
  391. ; The access log format.
  392. ; The following syntax is allowed
  393. ; %%: the '%' character
  394. ; %C: %CPU used by the request
  395. ; it can accept the following format:
  396. ; - %{user}C for user CPU only
  397. ; - %{system}C for system CPU only
  398. ; - %{total}C for user + system CPU (default)
  399. ; %d: time taken to serve the request
  400. ; it can accept the following format:
  401. ; - %{seconds}d (default)
  402. ; - %{miliseconds}d
  403. ; - %{mili}d
  404. ; - %{microseconds}d
  405. ; - %{micro}d
  406. ; %e: an environment variable (same as $_ENV or $_SERVER)
  407. ; it must be associated with embraces to specify the name of the env
  408. ; variable. Some exemples:
  409. ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
  410. ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
  411. ; %f: script filename
  412. ; %l: content-length of the request (for POST request only)
  413. ; %m: request method
  414. ; %M: peak of memory allocated by PHP
  415. ; it can accept the following format:
  416. ; - %{bytes}M (default)
  417. ; - %{kilobytes}M
  418. ; - %{kilo}M
  419. ; - %{megabytes}M
  420. ; - %{mega}M
  421. ; %n: pool name
  422. ; %o: output header
  423. ; it must be associated with embraces to specify the name of the header:
  424. ; - %{Content-Type}o
  425. ; - %{X-Powered-By}o
  426. ; - %{Transfert-Encoding}o
  427. ; - ....
  428. ; %p: PID of the child that serviced the request
  429. ; %P: PID of the parent of the child that serviced the request
  430. ; %q: the query string
  431. ; %Q: the '?' character if query string exists
  432. ; %r: the request URI (without the query string, see %q and %Q)
  433. ; %R: remote IP address
  434. ; %s: status (response code)
  435. ; %t: server time the request was received
  436. ; it can accept a strftime(3) format:
  437. ; %d/%b/%Y:%H:%M:%S %z (default)
  438. ; %T: time the log has been written (the request has finished)
  439. ; it can accept a strftime(3) format:
  440. ; %d/%b/%Y:%H:%M:%S %z (default)
  441. ; %u: remote user
  442. ;
  443. ; Default: "%R - %u %t \"%m %r\" %s"
  444. ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 如果打开此功能可自定义日志格式(使用默认即可)
  445.  
  446. ; The log file for slow requests
  447. ; Default Value: not set
  448. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  449. slowlog = log/$pool.log.slow 这里是设置慢请求的记录日志路径(慢请求,慢查询)
  450.  
  451. ; The timeout for serving a single request after which a PHP backtrace will be
  452. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  453. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  454. ; Default Value: 0
  455. request_slowlog_timeout = 0 设置为10s或15s,如果那个请求慢,超过设定的时间,就写入日志
  456.  
  457. ; The timeout for serving a single request after which the worker process will
  458. ; be killed. This option should be used when the 'max_execution_time' ini option
  459. ; does not stop script execution for some reason. A value of '0' means 'off'.
  460. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  461. ; Default Value: 0
  462. request_terminate_timeout = 0
  463. 设置单个请求的超时中止时间. 该选项可能会对php.ini设置中的'max_execution_time'因为某些特殊原因没有中止运行的脚本有用.
  464. 设置为 '0' 表示 'Off'.当经常出现502错误时可以尝试更改此选项
  465.  
  466. ; Set open file descriptor rlimit.
  467. ; Default Value: system defined value
  468. ;rlimit_files = 1024 设置文件打开描述符的rlimit限制. 默认值: 系统定义值默认可打开句柄是1024,可使用 ulimit -n查看,ulimit -n 2048修改
  469.  
  470. ; Set max core size rlimit.
  471. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  472. ; Default Value: system defined value
  473. ;rlimit_core = 0 设置核心rlimit最大限制值. 可用值: ‘unlimited’ 、0或者正整数. 默认值: 系统定义值
  474.  
  475. ; Chroot to this directory at the start. This value must be defined as an
  476. ; absolute path. When this value is not set, chroot is not used.
  477. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
  478. ; of its subdirectories. If the pool prefix is not set, the global prefix
  479. ; will be used instead.
  480. ; Note: chrooting is a great security feature and should be used whenever
  481. ; possible. However, all PHP paths will be relative to the chroot
  482. ; (error_log, sessions.save_path, ...).
  483. ; Default Value: not set
  484. ;chroot = 启动时的Chroot目录. 所定义的目录需要是绝对路径. 如果没有设置, 则chroot不被使用(默认即可)
  485.  
  486. ; Chdir to this directory at the start.
  487. ; Note: relative path can be used.
  488. ; Default Value: current directory or / when chroot
  489. ;chdir = /var/www 设置启动目录,启动时会自动Chdir到该目录. 所定义的目录需要是绝对路径. 默认值: 当前目录,或者/目录(chroot时)默认即可
  1. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  2. ; stderr will be redirected to /dev/null according to FastCGI specs.
  3. ; Note: on highloaded environement, this can cause some delay in the page
  4. ; process time (several ms).
  5. ; Default Value: no
  6. ;catch_workers_output = yes
  7.  
  8. ; Clear environment in FPM workers
  9. ; Prevents arbitrary environment variables from reaching FPM worker processes
  10. ; by clearing the environment in workers before env vars specified in this
  11. ; pool configuration are added.
  12. ; Setting to "no" will make all environment variables available to PHP code
  13. ; via getenv(), $_ENV and $_SERVER.
  14. ; Default Value: yes
  15. ;clear_env = no
  16.  
  17. ; Limits the extensions of the main script FPM will allow to parse. This can
  18. ; prevent configuration mistakes on the web server side. You should only limit
  19. ; FPM to .php extensions to prevent malicious users to use other extensions to
  20. ; exectute php code.
  21. ; Note: set an empty value to allow all extensions.
  22. ; Default Value: .php
  23. ;security.limit_extensions = .php .php3 .php4 .php5
  24.  
  25. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  26. ; the current environment.
  27. ; Default Value: clean env
  28. ;env[HOSTNAME] = $HOSTNAME
  29. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  30. ;env[TMP] = /tmp
  31. ;env[TMPDIR] = /tmp
  32. ;env[TEMP] = /tmp
  33.  
  34. ; Additional php.ini defines, specific to this pool of workers. These settings
  35. ; overwrite the values previously defined in the php.ini. The directives are the
  36. ; same as the PHP SAPI:
  37. ; php_value/php_flag - you can set classic ini defines which can
  38. ; be overwritten from PHP call 'ini_set'.
  39. ; php_admin_value/php_admin_flag - these directives won't be overwritten by
  40. ; PHP call 'ini_set'
  41. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  42.  
  43. ; Defining 'extension' will load the corresponding shared extension from
  44. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  45. ; overwrite previously defined php.ini values, but will append the new value
  46. ; instead.
  47.  
  48. ; Note: path INI options can be relative and will be expanded with the prefix
  49. ; (pool, global or /usr)
  50.  
  51. ; Default Value: nothing is defined by default except the values in php.ini and
  52. ; specified at startup with the -d argument
  53. php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 去掉注释打开此功能,设置管理员邮箱地址
  54. ;php_flag[display_errors] = off
  55. ;php_admin_value[error_log] = /var/log/fpm-php.www.log
  56. ;php_admin_flag[log_errors] = on
  57. ;php_admin_value[memory_limit] = 32M

  

php-fpm.conf.default配置文件的更多相关文章

  1. centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课

    centos  LNMP第一部分环境搭建 LAMP安装先后顺序  LNMP安装先后顺序 php安装 安装nginx  编写nginx启动脚本   懒汉模式  mv   /usr/local/php/{ ...

  2. vue-cli脚手架build目录中的webpack.dev.conf.js配置文件

    此文章用来解释vue-cli脚手架build目录中的webpack.dev.conf.js配置文件 此配置文件是vue开发环境的wepack相关配置文件 关于注释 当涉及到较复杂的解释我将通过标识的方 ...

  3. vue-cli脚手架build目录中的webpack.prod.conf.js配置文件

    // 下面是引入nodejs的路径模块 var path = require('path') // 下面是utils工具配置文件,主要用来处理css类文件的loader var utils = req ...

  4. vue-cli 2.x脚手架build目录中的webpack.base.conf.js配置文件

    此文章用来解释vue-cli脚手架build目录中的webpack.base.conf.js配置文件,适用于vue-cli 2.x版本 此配置文件是vue开发环境的wepack相关配置文件,主要用来处 ...

  5. vue-cli脚手架build目录中的webpack.base.conf.js配置文件

    转载自:http://www.cnblogs.com/ye-hcj/p/7082620.html webpack.base.conf.js配置文件// 引入nodejs路径模块 var path = ...

  6. Linux(7)- Nginx.conf主配置文件、Nginx虚拟主机/访问日志/限制访问IP/错误页面优化、Nginx反向代理、Nginx负载均衡

    一.Nginx.conf主配置文件 Nginx主配置文件conf/nginx.conf是一个纯文本类型的文件,整个配置文件是以区块的形式组织的.一般,每个区块以一对大括号{}来表示开始与结束. 核心模 ...

  7. vue-cli脚手架build目录中的karma.conf.js配置文件

    本文系统讲解vue-cli脚手架build目录中的karma.conf.js配置文件 这个配置文件是命令 npm run unit 的入口配置文件,主要用于单元测试 这条命令的内容如下 "c ...

  8. nginx.conf.default

    [root@web03 conf]# vim nginx.conf.default #user nobody;worker_processes 1; #error_log logs/error.log ...

  9. host.conf - 解析配置文件

    DESCRIPTION (描述) 文件 /etc/host.conf 包含了为解析库声明的配置信息. 它应该每行含一个配置关键字, 其后跟着合适的配置信息. 系统识别的关键字有: order, tri ...

随机推荐

  1. window 10 安装Oracle odac 64位

    下载地址:https://www.oracle.com/cn/database/technologies/windows/downloads.html 可以下载XCopy版,也可以继续往下看下载安装文 ...

  2. CDQ 入门

    推荐博客 :https://blog.csdn.net/wu_tongtong/article/details/78785836 https://www.cnblogs.com/mlystdcall/ ...

  3. 【转】KAFKA分布式消息系统

    Kafka[1]是linkedin用于日志处理的分布式消息队列,linkedin的日志数据容量大,但对可靠性要求不高,其日志数据主要包括用户行为(登录.浏览.点击.分享.喜欢)以及系统运行日志(CPU ...

  4. make_safe

    from django.utils.safestring import mark_safe mark_safe('<input type="checkbox" id=&quo ...

  5. Unity3d游戏角色描边

    本文发布于游戏程序员刘宇的个人博客,欢迎转载,请注明来源https://www.cnblogs.com/xiaohutu/p/10834491.html 游戏里经常需要在角色上做描边,这里总结一下平时 ...

  6. Java入门 - 语言基础 - 01.Java简介

    原文地址:http://www.work100.net/training/java-intro.html 更多教程:光束云 - 免费课程 Java简介 序号 文内章节 视频 1 概述 2 主要特性 3 ...

  7. .net core 第三方工具包集合

    日志 Nlog 单点登录

  8. 【转载】Notepad++源码分析

    在网上发现了一个哥们写了关于Notepad++源码的文章,不过就写了一就没有了,我就接着他的工作再说说吧! 大三了,也写了一点儿程序了,但是如果只是按照自己的思路写下去恐怕难以提高,于是准备开始阅读一 ...

  9. 分层有限状态机的C++实现

    为了方便我的游戏开发,写了这么一个通用的分层有限状态机.希望在其稳定以后,可以作为一个组件加入到我的游戏引擎当中. 目前使用了std::function来调用回调函数,在未来可能会用委托机制代替. 第 ...

  10. Ninja构建系统入门

    1. 介绍 开篇先介绍.先甩资料给大家看,之后再自己演示一下基本使用.Ninja 是Google的一名程序员推出的注重速度的构建工具,一般在Unix/Linux上的程序通过make/makefile来 ...