File php-fpm-www.conf of Package pihole-admin-lte
xxxxxxxxxx
1
; Start a new pool named 'pihole'.
2
; the variable $pool can be used in any directive and will be replaced by the
3
; pool name ('pihole' here)
4
[pihole]
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 /usr) 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
; PHP needs to be able to access Pihole’s data
24
user = nobody
25
group = pihole
26
27
; The address on which to accept FastCGI requests.
28
; Valid syntaxes are:
29
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
30
; a specific port;
31
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
32
; a specific port;
33
; 'port' - to listen on a TCP socket to all addresses
34
; (IPv6 and IPv4-mapped) on a specific port;
35
; '/path/to/unix/socket' - to listen on a unix socket.
36
; Note: This value is mandatory.
37
;listen = 127.0.0.1:9000
38
listen = /run/php-fpm/pihole.sock
39
40
; Set listen(2) backlog.
41
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
42
;listen.backlog = 511
43
listen.backlog = 65535
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. Many
47
; BSD-derived systems allow connections regardless of permissions.
48
; Default Values: user and group are set as the running user
49
; mode is set to 0660
50
listen.owner = nginx
51
listen.group = nginx
52
;listen.mode = 0660
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 =
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 = 5
117
pm.max_children = 10
118
119
; The number of child processes created on startup.
120
; Note: Used only when pm is set to 'dynamic'
121
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
122
pm.start_servers = 2
123
124
; The desired minimum number of idle server processes.
125
; Note: Used only when pm is set to 'dynamic'
126
; Note: Mandatory when pm is set to 'dynamic'
127
pm.min_spare_servers = 1
128
129
; The desired maximum number of idle server processes.
130
; Note: Used only when pm is set to 'dynamic'
131
; Note: Mandatory when pm is set to 'dynamic'
132
pm.max_spare_servers = 3
133
134
; The number of seconds after which an idle process will be killed.
135
; Note: Used only when pm is set to 'ondemand'
136
; Default Value: 10s
137
;pm.process_idle_timeout = 10s;
138
139
; The number of requests each child process should execute before respawning.
140
; This can be useful to work around memory leaks in 3rd party libraries. For
141
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
142
; Default Value: 0
143
;pm.max_requests = 500
144
145
; The URI to view the FPM status page. If this value is not set, no URI will be
146
; recognized as a status page. It shows the following informations:
147
; pool - the name of the pool;
148
; process manager - static, dynamic or ondemand;
149
; start time - the date and time FPM has started;
150
; start since - number of seconds since FPM has started;
151
; accepted conn - the number of request accepted by the pool;
152
; listen queue - the number of request in the queue of pending
153
; connections (see backlog in listen(2));
154
; max listen queue - the maximum number of requests in the queue
155
; of pending connections since FPM has started;
156
; listen queue len - the size of the socket queue of pending connections;
157
; idle processes - the number of idle processes;
158
; active processes - the number of active processes;
159
; total processes - the number of idle + active processes;
160
; max active processes - the maximum number of active processes since FPM
161
; has started;
162
; max children reached - number of times, the process limit has been reached,
163
; when pm tries to start more children (works only for
164
; pm 'dynamic' and 'ondemand');
165
; Value are updated in real time.
166
; Example output:
167
; pool: www
168
; process manager: static
169
; start time: 01/Jul/2011:17:53:49 +0200
170
; start since: 62636
171
; accepted conn: 190460
172
; listen queue: 0
173
; max listen queue: 1
174
; listen queue len: 42
175
; idle processes: 4
176
; active processes: 11
177
; total processes: 15
178
; max active processes: 12
179
; max children reached: 0
180
;
181
; By default the status page only outputs short status. Passing 'full' in the
182
; query string will also return status for each pool process.
183
; Example:
184
; http://www.foo.bar/status?full
185
; http://www.foo.bar/status?json&full
186
; http://www.foo.bar/status?html&full
187
; http://www.foo.bar/status?xml&full
188
; The Full status returns for each process:
189
; pid - the PID of the process;
190
; state - the state of the process (Idle, Running, ...);
191
; start time - the date and time the process has started;
192
; start since - the number of seconds since the process has started;
193
; requests - the number of requests the process has served;
194
; request duration - the duration in µs of the requests;
195
; request method - the request method (GET, POST, ...);
196
; request URI - the request URI with the query string;
197
; content length - the content length of the request (only with POST);
198
; user - the user (PHP_AUTH_USER) (or '-' if not set);
199
; script - the main script called (or '-' if not set);
200
; last request cpu - the %cpu the last request consumed
201
; it's always 0 if the process is not in Idle state
202
; because CPU calculation is done when the request
203
; processing has terminated;
204
; last request memory - the max amount of memory the last request consumed
205
; it's always 0 if the process is not in Idle state
206
; because memory calculation is done when the request
207
; processing has terminated;
208
; If the process is in Idle state, then informations are related to the
209
; last request the process has served. Otherwise informations are related to
210
; the current request being served.
211
; Example output:
212
; ************************
213
; pid: 31330
214
; state: Running
215
; start time: 01/Jul/2011:17:53:49 +0200
216
; start since: 63087
217
; requests: 12808
218
; request duration: 1250261
219
; request method: GET
220
; request URI: /test_mem.php?N=10000
221
; content length: 0
222
; user: -
223
; script: /home/fat/web/docs/php/test_mem.php
224
; last request cpu: 0.00
225
; last request memory: 0
226
;
227
; Note: There is a real-time FPM status monitoring sample web page available
228
; It's available in: /usr/share/php7/fpm/status.html
229
;
230
; Note: The value must start with a leading slash (/). The value can be
231
; anything, but it may not be a good idea to use the .php extension or it
232
; may conflict with a real PHP file.
233
; Default Value: not set
234
;pm.status_path = /status
235
236
; The ping URI to call the monitoring page of FPM. If this value is not set, no
237
; URI will be recognized as a ping page. This could be used to test from outside
238
; that FPM is alive and responding, or to
239
; - create a graph of FPM availability (rrd or such);
240
; - remove a server from a group if it is not responding (load balancing);
241
; - trigger alerts for the operating team (24/7).
242
; Note: The value must start with a leading slash (/). The value can be
243
; anything, but it may not be a good idea to use the .php extension or it
244
; may conflict with a real PHP file.
245
; Default Value: not set
246
;ping.path = /ping
247
248
; This directive may be used to customize the response of a ping request. The
249
; response is formatted as text/plain with a 200 response code.
250
; Default Value: pong
251
;ping.response = pong
252
253
; The access log file
254
; Default: not set
255
;access.log = log/$pool.access.log
256
257
; The access log format.
258
; The following syntax is allowed
259
; %%: the '%' character
260
; %C: %CPU used by the request
261
; it can accept the following format:
262
; - %{user}C for user CPU only
263
; - %{system}C for system CPU only
264
; - %{total}C for user + system CPU (default)
265
; %d: time taken to serve the request
266
; it can accept the following format:
267
; - %{seconds}d (default)
268
; - %{miliseconds}d
269
; - %{mili}d
270
; - %{microseconds}d
271
; - %{micro}d
272
; %e: an environment variable (same as $_ENV or $_SERVER)
273
; it must be associated with embraces to specify the name of the env
274
; variable. Some exemples:
275
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
276
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
277
; %f: script filename
278
; %l: content-length of the request (for POST request only)
279
; %m: request method
280
; %M: peak of memory allocated by PHP
281
; it can accept the following format:
282
; - %{bytes}M (default)
283
; - %{kilobytes}M
284
; - %{kilo}M
285
; - %{megabytes}M
286
; - %{mega}M
287
; %n: pool name
288
; %o: output header
289
; it must be associated with embraces to specify the name of the header:
290
; - %{Content-Type}o
291
; - %{X-Powered-By}o
292
; - %{Transfert-Encoding}o
293
; - ....
294
; %p: PID of the child that serviced the request
295
; %P: PID of the parent of the child that serviced the request
296
; %q: the query string
297
; %Q: the '?' character if query string exists
298
; %r: the request URI (without the query string, see %q and %Q)
299
; %R: remote IP address
300
; %s: status (response code)
301
; %t: server time the request was received
302
; it can accept a strftime(3) format:
303
; %d/%b/%Y:%H:%M:%S %z (default)
304
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
305
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
306
; %T: time the log has been written (the request has finished)
307
; it can accept a strftime(3) format:
308
; %d/%b/%Y:%H:%M:%S %z (default)
309
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
310
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
311
; %u: remote user
312
;
313
; Default: "%R - %u %t \"%m %r\" %s"
314
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
315
316
; The log file for slow requests
317
; Default Value: not set
318
; Note: slowlog is mandatory if request_slowlog_timeout is set
319
;slowlog = log/$pool.log.slow
320
321
; The timeout for serving a single request after which a PHP backtrace will be
322
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
323
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
324
; Default Value: 0
325
;request_slowlog_timeout = 0
326
327
; Depth of slow log stack trace.
328
; Default Value: 20
329
;request_slowlog_trace_depth = 20
330
331
; The timeout for serving a single request after which the worker process will
332
; be killed. This option should be used when the 'max_execution_time' ini option
333
; does not stop script execution for some reason. A value of '0' means 'off'.
334
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
335
; Default Value: 0
336
;request_terminate_timeout = 0
337
request_terminate_timeout = 600
338
339
; Set open file descriptor rlimit.
340
; Default Value: system defined value
341
;rlimit_files = 1024
342
343
; Set max core size rlimit.
344
; Possible Values: 'unlimited' or an integer greater or equal to 0
345
; Default Value: system defined value
346
;rlimit_core = 0
347
348
; Chroot to this directory at the start. This value must be defined as an
349
; absolute path. When this value is not set, chroot is not used.
350
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
351
; of its subdirectories. If the pool prefix is not set, the global prefix
352
; will be used instead.
353
; Note: chrooting is a great security feature and should be used whenever
354
; possible. However, all PHP paths will be relative to the chroot
355
; (error_log, sessions.save_path, ...).
356
; Default Value: not set
357
;chroot =
358
359
; Chdir to this directory at the start.
360
; Note: relative path can be used.
361
; Default Value: current directory or / when chroot
362
;chdir = /var/www
363
364
; Redirect worker stdout and stderr into main error log. If not set, stdout and
365
; stderr will be redirected to /dev/null according to FastCGI specs.
366
; Note: on highloaded environement, this can cause some delay in the page
367
; process time (several ms).
368
; Default Value: no
369
;catch_workers_output = yes
370
371
; Clear environment in FPM workers
372
; Prevents arbitrary environment variables from reaching FPM worker processes
373
; by clearing the environment in workers before env vars specified in this
374
; pool configuration are added.
375
; Setting to "no" will make all environment variables available to PHP code
376
; via getenv(), $_ENV and $_SERVER.
377
; Default Value: yes
378
;clear_env = no
379
380
; Limits the extensions of the main script FPM will allow to parse. This can
381
; prevent configuration mistakes on the web server side. You should only limit
382
; FPM to .php extensions to prevent malicious users to use other extensions to
383
; execute php code.
384
; Note: set an empty value to allow all extensions.
385
; Default Value: .php
386
;security.limit_extensions = .php .php3 .php4 .php5 .php7
387
388
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
389
; the current environment.
390
; Default Value: clean env
391
;env[HOSTNAME] = $HOSTNAME
392
;env[PATH] = /usr/local/bin:/usr/bin:/bin
393
;env[TMP] = /tmp
394
;env[TMPDIR] = /tmp
395
;env[TEMP] = /tmp
396
env[PHP_ERROR_LOG] = /var/log/pihole/adminlte-error.log
397
398
; Additional php.ini defines, specific to this pool of workers. These settings
399
; overwrite the values previously defined in the php.ini. The directives are the
400
; same as the PHP SAPI:
401
; php_value/php_flag - you can set classic ini defines which can
402
; be overwritten from PHP call 'ini_set'.
403
; php_admin_value/php_admin_flag - these directives won't be overwritten by
404
; PHP call 'ini_set'
405
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
406
407
; Defining 'extension' will load the corresponding shared extension from
408
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
409
; overwrite previously defined php.ini values, but will append the new value
410
; instead.
411
412
; Note: path INI options can be relative and will be expanded with the prefix
413
; (pool, global or /usr)
414
415
; Default Value: nothing is defined by default except the values in php.ini and
416
; specified at startup with the -d argument
417
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
418
;php_flag[display_errors] = off
419
php_admin_value[error_log] = /var/log/pihole/fpm-php.www.log
420
;php_admin_flag[log_errors] = on
421
;php_admin_value[memory_limit] = 32M
422
php_admin_value[error_reporting] = E_ALL
423
424