Guest User

www.conf

a guest
Aug 9th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Start a new pool named 'www'.
  2. ; the variable $pool can be used in any directive and will be replaced by the
  3. ; pool name ('www' here)
  4. [www]
  5.  
  6. ; Per pool prefix
  7. ; It only applies on the following directives:
  8. ; - 'access.log'
  9. ; - 'slowlog'
  10. ; - 'listen' (unixsocket)
  11. ; - 'chroot'
  12. ; - 'chdir'
  13. ; - 'php_values'
  14. ; - 'php_admin_values'
  15. ; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
  16. ; Note: This directive can also be relative to the global prefix.
  17. ; Default Value: none
  18. ;prefix = /path/to/pools/$pool
  19.  
  20. ; Unix user/group of processes
  21. ; Note: The user is mandatory. If the group is not set, the default user's group
  22. ;       will be used.
  23. ; RPM: apache user chosen to provide access to the same directories as httpd
  24. user = nginx
  25. ; RPM: Keep a group allowed to write in log dir.
  26. group = nginx
  27.  
  28. ; The address on which to accept FastCGI requests.
  29. ; Valid syntaxes are:
  30. ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
  31. ;                            a specific port;
  32. ;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
  33. ;                            a specific port;
  34. ;   'port'                 - to listen on a TCP socket to all addresses
  35. ;                            (IPv6 and IPv4-mapped) on a specific port;
  36. ;   '/path/to/unix/socket' - to listen on a unix socket.
  37. ; Note: This value is mandatory.
  38. listen = /run/php-fpm/www.sock
  39.  
  40. ; Set listen(2) backlog.
  41. ; Default Value: 511
  42. ;listen.backlog = 511
  43.  
  44. ; Set permissions for unix socket, if one is used. In Linux, read/write
  45. ; permissions must be set in order to allow connections from a web server.
  46. ; Default Values: user and group are set as the running user
  47. ;                 mode is set to 0660
  48. listen.owner = nobody
  49. listen.group = nobody
  50. ;listen.mode = 0660
  51.  
  52. ; When POSIX Access Control Lists are supported you can set them using
  53. ; these options, value is a comma separated list of user/group names.
  54. ; When set, listen.owner and listen.group are ignored
  55. listen.acl_users = apache,nginx
  56. ;listen.acl_groups =
  57.  
  58. ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
  59. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
  60. ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
  61. ; must be separated by a comma. If this value is left blank, connections will be
  62. ; accepted from any ip address.
  63. ; Default Value: any
  64. listen.allowed_clients = 127.0.0.1
  65.  
  66. ; Specify the nice(2) priority to apply to the pool processes (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 processes will inherit the master process priority
  70. ;         unless it specified otherwise
  71. ; Default Value: no set
  72. ; process.priority = -19
  73.  
  74. ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
  75. ; or group is differrent than the master process user. It allows to create process
  76. ; core dump and ptrace the process for the pool user.
  77. ; Default Value: no
  78. ; process.dumpable = yes
  79.  
  80. ; Choose how the process manager will control the number of child processes.
  81. ; Possible Values:
  82. ;   static  - a fixed number (pm.max_children) of child processes;
  83. ;   dynamic - the number of child processes are set dynamically based on the
  84. ;             following directives. With this process management, there will be
  85. ;             always at least 1 children.
  86. ;             pm.max_children      - the maximum number of children that can
  87. ;                                    be alive at the same time.
  88. ;             pm.start_servers     - the number of children created on startup.
  89. ;             pm.min_spare_servers - the minimum number of children in 'idle'
  90. ;                                    state (waiting to process). If the number
  91. ;                                    of 'idle' processes is less than this
  92. ;                                    number then some children will be created.
  93. ;             pm.max_spare_servers - the maximum number of children in 'idle'
  94. ;                                    state (waiting to process). If the number
  95. ;                                    of 'idle' processes is greater than this
  96. ;                                    number then some children will be killed.
  97. ;  ondemand - no children are created at startup. Children will be forked when
  98. ;             new requests will connect. The following parameter are used:
  99. ;             pm.max_children           - the maximum number of children that
  100. ;                                         can be alive at the same time.
  101. ;             pm.process_idle_timeout   - The number of seconds after which
  102. ;                                         an idle process will be killed.
  103. ; Note: This value is mandatory.
  104. pm = dynamic
  105.  
  106. ; The number of child processes to be created when pm is set to 'static' and the
  107. ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
  108. ; This value sets the limit on the number of simultaneous requests that will be
  109. ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
  110. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
  111. ; CGI. The below defaults are based on a server without much resources. Don't
  112. ; forget to tweak pm.* to fit your needs.
  113. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
  114. ; Note: This value is mandatory.
  115. pm.max_children = 50
  116.  
  117. ; The number of child processes created on startup.
  118. ; Note: Used only when pm is set to 'dynamic'
  119. ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
  120. pm.start_servers = 5
  121.  
  122. ; The desired minimum number of idle server processes.
  123. ; Note: Used only when pm is set to 'dynamic'
  124. ; Note: Mandatory when pm is set to 'dynamic'
  125. pm.min_spare_servers = 5
  126.  
  127. ; The desired maximum number of idle server processes.
  128. ; Note: Used only when pm is set to 'dynamic'
  129. ; Note: Mandatory when pm is set to 'dynamic'
  130. pm.max_spare_servers = 35
  131.  
  132. ; The number of seconds after which an idle process will be killed.
  133. ; Note: Used only when pm is set to 'ondemand'
  134. ; Default Value: 10s
  135. ;pm.process_idle_timeout = 10s;
  136.  
  137. ; The number of requests each child process should execute before respawning.
  138. ; This can be useful to work around memory leaks in 3rd party libraries. For
  139. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
  140. ; Default Value: 0
  141. ;pm.max_requests = 500
  142.  
  143. ; The URI to view the FPM status page. If this value is not set, no URI will be
  144. ; recognized as a status page. It shows the following informations:
  145. ;   pool                 - the name of the pool;
  146. ;   process manager      - static, dynamic or ondemand;
  147. ;   start time           - the date and time FPM has started;
  148. ;   start since          - number of seconds since FPM has started;
  149. ;   accepted conn        - the number of request accepted by the pool;
  150. ;   listen queue         - the number of request in the queue of pending
  151. ;                          connections (see backlog in listen(2));
  152. ;   max listen queue     - the maximum number of requests in the queue
  153. ;                          of pending connections since FPM has started;
  154. ;   listen queue len     - the size of the socket queue of pending connections;
  155. ;   idle processes       - the number of idle processes;
  156. ;   active processes     - the number of active processes;
  157. ;   total processes      - the number of idle + active processes;
  158. ;   max active processes - the maximum number of active processes since FPM
  159. ;                          has started;
  160. ;   max children reached - number of times, the process limit has been reached,
  161. ;                          when pm tries to start more children (works only for
  162. ;                          pm 'dynamic' and 'ondemand');
  163. ; Value are updated in real time.
  164. ; Example output:
  165. ;   pool:                 www
  166. ;   process manager:      static
  167. ;   start time:           01/Jul/2011:17:53:49 +0200
  168. ;   start since:          62636
  169. ;   accepted conn:        190460
  170. ;   listen queue:         0
  171. ;   max listen queue:     1
  172. ;   listen queue len:     42
  173. ;   idle processes:       4
  174. ;   active processes:     11
  175. ;   total processes:      15
  176. ;   max active processes: 12
  177. ;   max children reached: 0
  178. ;
  179. ; By default the status page output is formatted as text/plain. Passing either
  180. ; 'html', 'xml' or 'json' in the query string will return the corresponding
  181. ; output syntax. Example:
  182. ;   http://www.foo.bar/status
  183. ;   http://www.foo.bar/status?json
  184. ;   http://www.foo.bar/status?html
  185. ;   http://www.foo.bar/status?xml
  186. ;
  187. ; By default the status page only outputs short status. Passing 'full' in the
  188. ; query string will also return status for each pool process.
  189. ; Example:
  190. ;   http://www.foo.bar/status?full
  191. ;   http://www.foo.bar/status?json&full
  192. ;   http://www.foo.bar/status?html&full
  193. ;   http://www.foo.bar/status?xml&full
  194. ; The Full status returns for each process:
  195. ;   pid                  - the PID of the process;
  196. ;   state                - the state of the process (Idle, Running, ...);
  197. ;   start time           - the date and time the process has started;
  198. ;   start since          - the number of seconds since the process has started;
  199. ;   requests             - the number of requests the process has served;
  200. ;   request duration     - the duration in µs of the requests;
  201. ;   request method       - the request method (GET, POST, ...);
  202. ;   request URI          - the request URI with the query string;
  203. ;   content length       - the content length of the request (only with POST);
  204. ;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
  205. ;   script               - the main script called (or '-' if not set);
  206. ;   last request cpu     - the %cpu the last request consumed
  207. ;                          it's always 0 if the process is not in Idle state
  208. ;                          because CPU calculation is done when the request
  209. ;                          processing has terminated;
  210. ;   last request memory  - the max amount of memory the last request consumed
  211. ;                          it's always 0 if the process is not in Idle state
  212. ;                          because memory calculation is done when the request
  213. ;                          processing has terminated;
  214. ; If the process is in Idle state, then informations are related to the
  215. ; last request the process has served. Otherwise informations are related to
  216. ; the current request being served.
  217. ; Example output:
  218. ;   ************************
  219. ;   pid:                  31330
  220. ;   state:                Running
  221. ;   start time:           01/Jul/2011:17:53:49 +0200
  222. ;   start since:          63087
  223. ;   requests:             12808
  224. ;   request duration:     1250261
  225. ;   request method:       GET
  226. ;   request URI:          /test_mem.php?N=10000
  227. ;   content length:       0
  228. ;   user:                 -
  229. ;   script:               /home/fat/web/docs/php/test_mem.php
  230. ;   last request cpu:     0.00
  231. ;   last request memory:  0
  232. ;
  233. ; Note: There is a real-time FPM status monitoring sample web page available
  234. ;       It's available in: @EXPANDED_DATADIR@/fpm/status.html
  235. ;
  236. ; Note: The value must start with a leading slash (/). The value can be
  237. ;       anything, but it may not be a good idea to use the .php extension or it
  238. ;       may conflict with a real PHP file.
  239. ; Default Value: not set
  240. ;pm.status_path = /status
  241.  
  242. ; The ping URI to call the monitoring page of FPM. If this value is not set, no
  243. ; URI will be recognized as a ping page. This could be used to test from outside
  244. ; that FPM is alive and responding, or to
  245. ; - create a graph of FPM availability (rrd or such);
  246. ; - remove a server from a group if it is not responding (load balancing);
  247. ; - trigger alerts for the operating team (24/7).
  248. ; Note: The value must start with a leading slash (/). The value can be
  249. ;       anything, but it may not be a good idea to use the .php extension or it
  250. ;       may conflict with a real PHP file.
  251. ; Default Value: not set
  252. ;ping.path = /ping
  253.  
  254. ; This directive may be used to customize the response of a ping request. The
  255. ; response is formatted as text/plain with a 200 response code.
  256. ; Default Value: pong
  257. ;ping.response = pong
  258.  
  259. ; The access log file
  260. ; Default: not set
  261. ;access.log = log/$pool.access.log
  262.  
  263. ; The access log format.
  264. ; The following syntax is allowed
  265. ;  %%: the '%' character
  266. ;  %C: %CPU used by the request
  267. ;      it can accept the following format:
  268. ;      - %{user}C for user CPU only
  269. ;      - %{system}C for system CPU only
  270. ;      - %{total}C  for user + system CPU (default)
  271. ;  %d: time taken to serve the request
  272. ;      it can accept the following format:
  273. ;      - %{seconds}d (default)
  274. ;      - %{miliseconds}d
  275. ;      - %{mili}d
  276. ;      - %{microseconds}d
  277. ;      - %{micro}d
  278. ;  %e: an environment variable (same as $_ENV or $_SERVER)
  279. ;      it must be associated with embraces to specify the name of the env
  280. ;      variable. Some exemples:
  281. ;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
  282. ;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
  283. ;  %f: script filename
  284. ;  %l: content-length of the request (for POST request only)
  285. ;  %m: request method
  286. ;  %M: peak of memory allocated by PHP
  287. ;      it can accept the following format:
  288. ;      - %{bytes}M (default)
  289. ;      - %{kilobytes}M
  290. ;      - %{kilo}M
  291. ;      - %{megabytes}M
  292. ;      - %{mega}M
  293. ;  %n: pool name
  294. ;  %o: output header
  295. ;      it must be associated with embraces to specify the name of the header:
  296. ;      - %{Content-Type}o
  297. ;      - %{X-Powered-By}o
  298. ;      - %{Transfert-Encoding}o
  299. ;      - ....
  300. ;  %p: PID of the child that serviced the request
  301. ;  %P: PID of the parent of the child that serviced the request
  302. ;  %q: the query string
  303. ;  %Q: the '?' character if query string exists
  304. ;  %r: the request URI (without the query string, see %q and %Q)
  305. ;  %R: remote IP address
  306. ;  %s: status (response code)
  307. ;  %t: server time the request was received
  308. ;      it can accept a strftime(3) format:
  309. ;      %d/%b/%Y:%H:%M:%S %z (default)
  310. ;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
  311. ;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
  312. ;  %T: time the log has been written (the request has finished)
  313. ;      it can accept a strftime(3) format:
  314. ;      %d/%b/%Y:%H:%M:%S %z (default)
  315. ;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
  316. ;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
  317. ;  %u: remote user
  318. ;
  319. ; Default: "%R - %u %t \"%m %r\" %s"
  320. ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
  321.  
  322. ; The log file for slow requests
  323. ; Default Value: not set
  324. ; Note: slowlog is mandatory if request_slowlog_timeout is set
  325. slowlog = /var/log/php-fpm/www-slow.log
  326.  
  327. ; The timeout for serving a single request after which a PHP backtrace will be
  328. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
  329. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  330. ; Default Value: 0
  331. ;request_slowlog_timeout = 0
  332.  
  333. ; Depth of slow log stack trace.
  334. ; Default Value: 20
  335. ;request_slowlog_trace_depth = 20
  336.  
  337. ; The timeout for serving a single request after which the worker process will
  338. ; be killed. This option should be used when the 'max_execution_time' ini option
  339. ; does not stop script execution for some reason. A value of '0' means 'off'.
  340. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
  341. ; Default Value: 0
  342. ;request_terminate_timeout = 0
  343.  
  344. ; Set open file descriptor rlimit.
  345. ; Default Value: system defined value
  346. ;rlimit_files = 1024
  347.  
  348. ; Set max core size rlimit.
  349. ; Possible Values: 'unlimited' or an integer greater or equal to 0
  350. ; Default Value: system defined value
  351. ;rlimit_core = 0
  352.  
  353. ; Chroot to this directory at the start. This value must be defined as an
  354. ; absolute path. When this value is not set, chroot is not used.
  355. ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
  356. ; of its subdirectories. If the pool prefix is not set, the global prefix
  357. ; will be used instead.
  358. ; Note: chrooting is a great security feature and should be used whenever
  359. ;       possible. However, all PHP paths will be relative to the chroot
  360. ;       (error_log, sessions.save_path, ...).
  361. ; Default Value: not set
  362. ;chroot =
  363.  
  364. ; Chdir to this directory at the start.
  365. ; Note: relative path can be used.
  366. ; Default Value: current directory or / when chroot
  367. ;chdir = /var/www
  368.  
  369. ; Redirect worker stdout and stderr into main error log. If not set, stdout and
  370. ; stderr will be redirected to /dev/null according to FastCGI specs.
  371. ; Note: on highloaded environement, this can cause some delay in the page
  372. ; process time (several ms).
  373. ; Default Value: no
  374. ;catch_workers_output = yes
  375.  
  376. ; Clear environment in FPM workers
  377. ; Prevents arbitrary environment variables from reaching FPM worker processes
  378. ; by clearing the environment in workers before env vars specified in this
  379. ; pool configuration are added.
  380. ; Setting to "no" will make all environment variables available to PHP code
  381. ; via getenv(), $_ENV and $_SERVER.
  382. ; Default Value: yes
  383. ;clear_env = no
  384.  
  385. ; Limits the extensions of the main script FPM will allow to parse. This can
  386. ; prevent configuration mistakes on the web server side. You should only limit
  387. ; FPM to .php extensions to prevent malicious users to use other extensions to
  388. ; execute php code.
  389. ; Note: set an empty value to allow all extensions.
  390. ; Default Value: .php
  391. ;security.limit_extensions = .php .php3 .php4 .php5 .php7
  392.  
  393. ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
  394. ; the current environment.
  395. ; Default Value: clean env
  396. ;env[HOSTNAME] = $HOSTNAME
  397. ;env[PATH] = /usr/local/bin:/usr/bin:/bin
  398. ;env[TMP] = /tmp
  399. ;env[TMPDIR] = /tmp
  400. ;env[TEMP] = /tmp
  401.  
  402. ; Additional php.ini defines, specific to this pool of workers. These settings
  403. ; overwrite the values previously defined in the php.ini. The directives are the
  404. ; same as the PHP SAPI:
  405. ;   php_value/php_flag             - you can set classic ini defines which can
  406. ;                                    be overwritten from PHP call 'ini_set'.
  407. ;   php_admin_value/php_admin_flag - these directives won't be overwritten by
  408. ;                                     PHP call 'ini_set'
  409. ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
  410.  
  411. ; Defining 'extension' will load the corresponding shared extension from
  412. ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
  413. ; overwrite previously defined php.ini values, but will append the new value
  414. ; instead.
  415.  
  416. ; Note: path INI options can be relative and will be expanded with the prefix
  417. ; (pool, global or @prefix@)
  418.  
  419. ; Default Value: nothing is defined by default except the values in php.ini and
  420. ;                specified at startup with the -d argument
  421. ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
  422. ;php_flag[display_errors] = off
  423. php_admin_value[error_log] = /var/log/php-fpm/www-error.log
  424. php_admin_flag[log_errors] = on
  425. ;php_admin_value[memory_limit] = 128M
  426.  
  427. ; Set the following data paths to directories owned by the FPM process user.
  428. ;
  429. ; Do not change the ownership of existing system directories, if the process
  430. ; user does not have write permission, create dedicated directories for this
  431. ; purpose.
  432. ;
  433. ; See warning about choosing the location of these directories on your system
  434. ; at http://php.net/session.save-path
  435. php_value[session.save_handler] = files
  436. php_value[session.save_path]    = /var/lib/php/session
  437. php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache
  438. ;php_value[opcache.file_cache]  = /var/lib/php/opcache
Advertisement
Add Comment
Please, Sign In to add comment