Compare Pastes

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