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