]> git.pld-linux.org Git - packages/php.git/blame - fpm-conf-split.patch
set fpm socket rw accessible by http group by default (instead of root:root)
[packages/php.git] / fpm-conf-split.patch
CommitLineData
8851ace1
ER
1--- php-5.6.2/sapi/fpm/php-fpm.conf.in~ 2014-10-15 15:59:32.000000000 +0300
2+++ php-5.6.2/sapi/fpm/php-fpm.conf.in 2014-10-27 08:12:12.930858749 +0200
b604e307
ER
3@@ -6,14 +6,6 @@
4 ; prefix (@prefix@). This prefix can be dynamically changed by using the
5 ; '-p' argument from the command line.
6
7-; Include one or more files. If glob(3) exists, it is used to include a bunch of
8-; files from a glob(3) pattern. This directive can be used everywhere in the
9-; file.
10-; Relative path can also be used. They will be prefixed by:
11-; - the global prefix if it's been set (-p argument)
12-; - @prefix@ otherwise
8851ace1 13-;include=etc/fpm.d/*.conf
b604e307
ER
14-
15 ;;;;;;;;;;;;;;;;;;
16 ; Global Options ;
17 ;;;;;;;;;;;;;;;;;;
8851ace1
ER
18@@ -123,405 +115,3 @@
19 ; ports and different management options. The name of the pool will be
b604e307
ER
20 ; used in logs and stats. There is no limitation on the number of pools which
21 ; FPM can handle. Your system will tell you anyway :)
8851ace1 22-
b604e307
ER
23-; Start a new pool named 'www'.
24-; the variable $pool can we used in any directive and will be replaced by the
25-; pool name ('www' here)
26-[www]
27-
28-; Per pool prefix
29-; It only applies on the following directives:
30-; - 'slowlog'
31-; - 'listen' (unixsocket)
32-; - 'chroot'
33-; - 'chdir'
34-; - 'php_values'
35-; - 'php_admin_values'
36-; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
37-; Note: This directive can also be relative to the global prefix.
38-; Default Value: none
39-;prefix = /path/to/pools/$pool
40-
41-; Unix user/group of processes
42-; Note: The user is mandatory. If the group is not set, the default user's group
43-; will be used.
44-user = @php_fpm_user@
45-group = @php_fpm_group@
46-
47-; The address on which to accept FastCGI requests.
48-; Valid syntaxes are:
49-; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
50-; a specific port;
51-; 'port' - to listen on a TCP socket to all addresses on a
52-; specific port;
53-; '/path/to/unix/socket' - to listen on a unix socket.
54-; Note: This value is mandatory.
8851ace1 55-listen = 127.0.0.1:9000
b604e307
ER
56-
57-; Set listen(2) backlog.
58-; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
59-;listen.backlog = 65535
60-
61-; Set permissions for unix socket, if one is used. In Linux, read/write
62-; permissions must be set in order to allow connections from a web server. Many
63-; BSD-derived systems allow connections regardless of permissions.
64-; Default Values: user and group are set as the running user
c42c0fb8 65-; mode is set to 0660
b604e307
ER
66-;listen.owner = @php_fpm_user@
67-;listen.group = @php_fpm_group@
c42c0fb8 68-;listen.mode = 0660
b604e307
ER
69-
70-; List of ipv4 addresses of FastCGI clients which are allowed to connect.
71-; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
72-; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
73-; must be separated by a comma. If this value is left blank, connections will be
74-; accepted from any ip address.
75-; Default Value: any
8851ace1 76-;listen.allowed_clients = 127.0.0.1
b604e307
ER
77-
78-; Specify the nice(2) priority to apply to the pool processes (only if set)
79-; The value can vary from -19 (highest priority) to 20 (lower priority)
80-; Note: - It will only work if the FPM master process is launched as root
81-; - The pool processes will inherit the master process priority
82-; unless it specified otherwise
83-; Default Value: no set
c42c0fb8 84-; process.priority = -19
b604e307
ER
85-
86-; Choose how the process manager will control the number of child processes.
87-; Possible Values:
88-; static - a fixed number (pm.max_children) of child processes;
89-; dynamic - the number of child processes are set dynamically based on the
90-; following directives. With this process management, there will be
91-; always at least 1 children.
92-; pm.max_children - the maximum number of children that can
93-; be alive at the same time.
94-; pm.start_servers - the number of children created on startup.
95-; pm.min_spare_servers - the minimum number of children in 'idle'
96-; state (waiting to process). If the number
97-; of 'idle' processes is less than this
98-; number then some children will be created.
99-; pm.max_spare_servers - the maximum number of children in 'idle'
100-; state (waiting to process). If the number
101-; of 'idle' processes is greater than this
102-; number then some children will be killed.
103-; ondemand - no children are created at startup. Children will be forked when
104-; new requests will connect. The following parameter are used:
105-; pm.max_children - the maximum number of children that
106-; can be alive at the same time.
107-; pm.process_idle_timeout - The number of seconds after which
108-; an idle process will be killed.
109-; Note: This value is mandatory.
110-pm = dynamic
111-
112-; The number of child processes to be created when pm is set to 'static' and the
113-; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
114-; This value sets the limit on the number of simultaneous requests that will be
115-; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
116-; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
117-; CGI. The below defaults are based on a server without much resources. Don't
118-; forget to tweak pm.* to fit your needs.
119-; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
120-; Note: This value is mandatory.
121-pm.max_children = 5
122-
123-; The number of child processes created on startup.
124-; Note: Used only when pm is set to 'dynamic'
125-; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
126-pm.start_servers = 2
127-
128-; The desired minimum 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.min_spare_servers = 1
132-
133-; The desired maximum number of idle server processes.
134-; Note: Used only when pm is set to 'dynamic'
135-; Note: Mandatory when pm is set to 'dynamic'
136-pm.max_spare_servers = 3
137-
138-; The number of seconds after which an idle process will be killed.
139-; Note: Used only when pm is set to 'ondemand'
140-; Default Value: 10s
141-;pm.process_idle_timeout = 10s;
142-
143-; The number of requests each child process should execute before respawning.
144-; This can be useful to work around memory leaks in 3rd party libraries. For
145-; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
146-; Default Value: 0
147-;pm.max_requests = 500
148-
149-; The URI to view the FPM status page. If this value is not set, no URI will be
150-; recognized as a status page. It shows the following informations:
151-; pool - the name of the pool;
152-; process manager - static, dynamic or ondemand;
153-; start time - the date and time FPM has started;
154-; start since - number of seconds since FPM has started;
155-; accepted conn - the number of request accepted by the pool;
156-; listen queue - the number of request in the queue of pending
157-; connections (see backlog in listen(2));
158-; max listen queue - the maximum number of requests in the queue
159-; of pending connections since FPM has started;
160-; listen queue len - the size of the socket queue of pending connections;
161-; idle processes - the number of idle processes;
162-; active processes - the number of active processes;
163-; total processes - the number of idle + active processes;
164-; max active processes - the maximum number of active processes since FPM
165-; has started;
166-; max children reached - number of times, the process limit has been reached,
167-; when pm tries to start more children (works only for
168-; pm 'dynamic' and 'ondemand');
169-; Value are updated in real time.
170-; Example output:
171-; pool: www
172-; process manager: static
173-; start time: 01/Jul/2011:17:53:49 +0200
174-; start since: 62636
175-; accepted conn: 190460
176-; listen queue: 0
177-; max listen queue: 1
178-; listen queue len: 42
179-; idle processes: 4
180-; active processes: 11
181-; total processes: 15
182-; max active processes: 12
183-; max children reached: 0
184-;
185-; By default the status page output is formatted as text/plain. Passing either
186-; 'html', 'xml' or 'json' in the query string will return the corresponding
187-; output syntax. Example:
188-; http://www.foo.bar/status
189-; http://www.foo.bar/status?json
190-; http://www.foo.bar/status?html
191-; http://www.foo.bar/status?xml
192-;
193-; By default the status page only outputs short status. Passing 'full' in the
194-; query string will also return status for each pool process.
195-; Example:
196-; http://www.foo.bar/status?full
197-; http://www.foo.bar/status?json&full
198-; http://www.foo.bar/status?html&full
199-; http://www.foo.bar/status?xml&full
200-; The Full status returns for each process:
201-; pid - the PID of the process;
202-; state - the state of the process (Idle, Running, ...);
203-; start time - the date and time the process has started;
204-; start since - the number of seconds since the process has started;
205-; requests - the number of requests the process has served;
206-; request duration - the duration in µs of the requests;
207-; request method - the request method (GET, POST, ...);
208-; request URI - the request URI with the query string;
209-; content length - the content length of the request (only with POST);
210-; user - the user (PHP_AUTH_USER) (or '-' if not set);
211-; script - the main script called (or '-' if not set);
212-; last request cpu - the %cpu the last request consumed
213-; it's always 0 if the process is not in Idle state
214-; because CPU calculation is done when the request
215-; processing has terminated;
216-; last request memory - the max amount of memory the last request consumed
217-; it's always 0 if the process is not in Idle state
218-; because memory calculation is done when the request
219-; processing has terminated;
220-; If the process is in Idle state, then informations are related to the
221-; last request the process has served. Otherwise informations are related to
222-; the current request being served.
223-; Example output:
224-; ************************
225-; pid: 31330
226-; state: Running
227-; start time: 01/Jul/2011:17:53:49 +0200
228-; start since: 63087
229-; requests: 12808
230-; request duration: 1250261
231-; request method: GET
232-; request URI: /test_mem.php?N=10000
233-; content length: 0
234-; user: -
235-; script: /home/fat/web/docs/php/test_mem.php
236-; last request cpu: 0.00
237-; last request memory: 0
238-;
239-; Note: There is a real-time FPM status monitoring sample web page available
240-; It's available in: @EXPANDED_DATADIR@/fpm/status.html
241-;
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-;pm.status_path = /status
247-
248-; The ping URI to call the monitoring page of FPM. If this value is not set, no
249-; URI will be recognized as a ping page. This could be used to test from outside
250-; that FPM is alive and responding, or to
251-; - create a graph of FPM availability (rrd or such);
252-; - remove a server from a group if it is not responding (load balancing);
253-; - trigger alerts for the operating team (24/7).
254-; Note: The value must start with a leading slash (/). The value can be
255-; anything, but it may not be a good idea to use the .php extension or it
256-; may conflict with a real PHP file.
257-; Default Value: not set
258-;ping.path = /ping
259-
260-; This directive may be used to customize the response of a ping request. The
261-; response is formatted as text/plain with a 200 response code.
262-; Default Value: pong
263-;ping.response = pong
264-
265-; The access log file
266-; Default: not set
267-;access.log = log/$pool.access.log
268-
269-; The access log format.
270-; The following syntax is allowed
271-; %%: the '%' character
272-; %C: %CPU used by the request
273-; it can accept the following format:
274-; - %{user}C for user CPU only
275-; - %{system}C for system CPU only
276-; - %{total}C for user + system CPU (default)
277-; %d: time taken to serve the request
278-; it can accept the following format:
279-; - %{seconds}d (default)
280-; - %{miliseconds}d
281-; - %{mili}d
282-; - %{microseconds}d
283-; - %{micro}d
284-; %e: an environment variable (same as $_ENV or $_SERVER)
285-; it must be associated with embraces to specify the name of the env
286-; variable. Some exemples:
287-; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
288-; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
289-; %f: script filename
290-; %l: content-length of the request (for POST request only)
291-; %m: request method
292-; %M: peak of memory allocated by PHP
293-; it can accept the following format:
294-; - %{bytes}M (default)
295-; - %{kilobytes}M
296-; - %{kilo}M
297-; - %{megabytes}M
298-; - %{mega}M
299-; %n: pool name
300-; %o: output header
301-; it must be associated with embraces to specify the name of the header:
302-; - %{Content-Type}o
303-; - %{X-Powered-By}o
304-; - %{Transfert-Encoding}o
305-; - ....
306-; %p: PID of the child that serviced the request
307-; %P: PID of the parent of the child that serviced the request
308-; %q: the query string
309-; %Q: the '?' character if query string exists
310-; %r: the request URI (without the query string, see %q and %Q)
311-; %R: remote IP address
312-; %s: status (response code)
313-; %t: server time the request was received
314-; it can accept a strftime(3) format:
315-; %d/%b/%Y:%H:%M:%S %z (default)
316-; %T: time the log has been written (the request has finished)
317-; it can accept a strftime(3) format:
318-; %d/%b/%Y:%H:%M:%S %z (default)
319-; %u: remote user
320-;
321-; Default: "%R - %u %t \"%m %r\" %s"
322-;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
323-
324-; The log file for slow requests
325-; Default Value: not set
326-; Note: slowlog is mandatory if request_slowlog_timeout is set
327-;slowlog = log/$pool.log.slow
328-
329-; The timeout for serving a single request after which a PHP backtrace will be
330-; dumped to the 'slowlog' file. A value of '0s' means 'off'.
331-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
332-; Default Value: 0
333-;request_slowlog_timeout = 0
334-
335-; The timeout for serving a single request after which the worker process will
336-; be killed. This option should be used when the 'max_execution_time' ini option
337-; does not stop script execution for some reason. A value of '0' means 'off'.
338-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
339-; Default Value: 0
340-;request_terminate_timeout = 0
341-
342-; Set open file descriptor rlimit.
343-; Default Value: system defined value
344-;rlimit_files = 1024
345-
346-; Set max core size rlimit.
347-; Possible Values: 'unlimited' or an integer greater or equal to 0
348-; Default Value: system defined value
349-;rlimit_core = 0
350-
351-; Chroot to this directory at the start. This value must be defined as an
352-; absolute path. When this value is not set, chroot is not used.
353-; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
354-; of its subdirectories. If the pool prefix is not set, the global prefix
355-; will be used instead.
356-; Note: chrooting is a great security feature and should be used whenever
357-; possible. However, all PHP paths will be relative to the chroot
358-; (error_log, sessions.save_path, ...).
359-; Default Value: not set
360-;chroot =
361-
362-; Chdir to this directory at the start.
363-; Note: relative path can be used.
364-; Default Value: current directory or / when chroot
365-;chdir = /var/www
366-
367-; Redirect worker stdout and stderr into main error log. If not set, stdout and
368-; stderr will be redirected to /dev/null according to FastCGI specs.
369-; Note: on highloaded environement, this can cause some delay in the page
370-; process time (several ms).
371-; Default Value: no
372-;catch_workers_output = yes
373-
8d42644e
ER
374-; Clear environment in FPM workers
375-; Prevents arbitrary environment variables from reaching FPM worker processes
376-; by clearing the environment in workers before env vars specified in this
377-; pool configuration are added.
378-; Setting to "no" will make all environment variables available to PHP code
379-; via getenv(), $_ENV and $_SERVER.
380-; Default Value: yes
381-;clear_env = no
382-
b604e307
ER
383-; Limits the extensions of the main script FPM will allow to parse. This can
384-; prevent configuration mistakes on the web server side. You should only limit
385-; FPM to .php extensions to prevent malicious users to use other extensions to
386-; exectute php code.
387-; Note: set an empty value to allow all extensions.
388-; Default Value: .php
389-;security.limit_extensions = .php .php3 .php4 .php5
390-
391-; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
392-; the current environment.
393-; Default Value: clean env
394-;env[HOSTNAME] = $HOSTNAME
8851ace1 395-;env[PATH] = /usr/local/bin:/usr/bin:/bin
b604e307
ER
396-;env[TMP] = /tmp
397-;env[TMPDIR] = /tmp
398-;env[TEMP] = /tmp
399-
400-; Additional php.ini defines, specific to this pool of workers. These settings
401-; overwrite the values previously defined in the php.ini. The directives are the
402-; same as the PHP SAPI:
403-; php_value/php_flag - you can set classic ini defines which can
404-; be overwritten from PHP call 'ini_set'.
405-; php_admin_value/php_admin_flag - these directives won't be overwritten by
406-; PHP call 'ini_set'
407-; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
408-
409-; Defining 'extension' will load the corresponding shared extension from
410-; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
411-; overwrite previously defined php.ini values, but will append the new value
412-; instead.
413-
414-; Note: path INI options can be relative and will be expanded with the prefix
415-; (pool, global or @prefix@)
416-
417-; Default Value: nothing is defined by default except the values in php.ini and
418-; specified at startup with the -d argument
419-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
420-;php_flag[display_errors] = off
421-;php_admin_value[error_log] = /var/log/fpm-php.www.log
422-;php_admin_flag[log_errors] = on
423-;php_admin_value[memory_limit] = 32M
b604e307 424--- /dev/null 2007-02-13 18:29:53.000000000 +0200
8851ace1
ER
425+++ php-5.6.2/sapi/fpm/php-fpm.conf-d.in 2014-10-27 08:12:03.327088104 +0200
426@@ -0,0 +1,401 @@
b604e307
ER
427+; Start a new pool named 'www'.
428+; the variable $pool can we used in any directive and will be replaced by the
429+; pool name ('www' here)
430+[www]
431+
432+; Per pool prefix
433+; It only applies on the following directives:
434+; - 'slowlog'
435+; - 'listen' (unixsocket)
436+; - 'chroot'
437+; - 'chdir'
438+; - 'php_values'
439+; - 'php_admin_values'
440+; When not set, the global prefix (or @php_fpm_prefix@) applies instead.
441+; Note: This directive can also be relative to the global prefix.
442+; Default Value: none
443+;prefix = /path/to/pools/$pool
444+
445+; Unix user/group of processes
446+; Note: The user is mandatory. If the group is not set, the default user's group
447+; will be used.
448+user = @php_fpm_user@
449+group = @php_fpm_group@
450+
451+; The address on which to accept FastCGI requests.
452+; Valid syntaxes are:
453+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
454+; a specific port;
455+; 'port' - to listen on a TCP socket to all addresses on a
456+; specific port;
457+; '/path/to/unix/socket' - to listen on a unix socket.
458+; Note: This value is mandatory.
8851ace1 459+listen = 127.0.0.1:9000
b604e307
ER
460+
461+; Set listen(2) backlog.
462+; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
463+;listen.backlog = 65535
464+
465+; Set permissions for unix socket, if one is used. In Linux, read/write
466+; permissions must be set in order to allow connections from a web server. Many
467+; BSD-derived systems allow connections regardless of permissions.
468+; Default Values: user and group are set as the running user
c42c0fb8 469+; mode is set to 0660
b604e307
ER
470+;listen.owner = @php_fpm_user@
471+;listen.group = @php_fpm_group@
c42c0fb8 472+;listen.mode = 0660
b604e307
ER
473+
474+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
475+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
476+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
477+; must be separated by a comma. If this value is left blank, connections will be
478+; accepted from any ip address.
479+; Default Value: any
8851ace1 480+;listen.allowed_clients = 127.0.0.1
b604e307
ER
481+
482+; Specify the nice(2) priority to apply to the pool processes (only if set)
483+; The value can vary from -19 (highest priority) to 20 (lower priority)
484+; Note: - It will only work if the FPM master process is launched as root
485+; - The pool processes will inherit the master process priority
486+; unless it specified otherwise
487+; Default Value: no set
c42c0fb8 488+; process.priority = -19
b604e307
ER
489+
490+; Choose how the process manager will control the number of child processes.
491+; Possible Values:
492+; static - a fixed number (pm.max_children) of child processes;
493+; dynamic - the number of child processes are set dynamically based on the
494+; following directives. With this process management, there will be
495+; always at least 1 children.
496+; pm.max_children - the maximum number of children that can
497+; be alive at the same time.
498+; pm.start_servers - the number of children created on startup.
499+; pm.min_spare_servers - the minimum number of children in 'idle'
500+; state (waiting to process). If the number
501+; of 'idle' processes is less than this
502+; number then some children will be created.
503+; pm.max_spare_servers - the maximum number of children in 'idle'
504+; state (waiting to process). If the number
505+; of 'idle' processes is greater than this
506+; number then some children will be killed.
507+; ondemand - no children are created at startup. Children will be forked when
508+; new requests will connect. The following parameter are used:
509+; pm.max_children - the maximum number of children that
510+; can be alive at the same time.
511+; pm.process_idle_timeout - The number of seconds after which
512+; an idle process will be killed.
513+; Note: This value is mandatory.
514+pm = dynamic
515+
516+; The number of child processes to be created when pm is set to 'static' and the
517+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
518+; This value sets the limit on the number of simultaneous requests that will be
519+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
520+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
521+; CGI. The below defaults are based on a server without much resources. Don't
522+; forget to tweak pm.* to fit your needs.
523+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
524+; Note: This value is mandatory.
525+pm.max_children = 5
526+
527+; The number of child processes created on startup.
528+; Note: Used only when pm is set to 'dynamic'
529+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
530+pm.start_servers = 2
531+
532+; The desired minimum number of idle server processes.
533+; Note: Used only when pm is set to 'dynamic'
534+; Note: Mandatory when pm is set to 'dynamic'
535+pm.min_spare_servers = 1
536+
537+; The desired maximum number of idle server processes.
538+; Note: Used only when pm is set to 'dynamic'
539+; Note: Mandatory when pm is set to 'dynamic'
540+pm.max_spare_servers = 3
541+
542+; The number of seconds after which an idle process will be killed.
543+; Note: Used only when pm is set to 'ondemand'
544+; Default Value: 10s
545+;pm.process_idle_timeout = 10s;
546+
547+; The number of requests each child process should execute before respawning.
548+; This can be useful to work around memory leaks in 3rd party libraries. For
549+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
550+; Default Value: 0
551+;pm.max_requests = 500
552+
553+; The URI to view the FPM status page. If this value is not set, no URI will be
554+; recognized as a status page. It shows the following informations:
555+; pool - the name of the pool;
556+; process manager - static, dynamic or ondemand;
557+; start time - the date and time FPM has started;
558+; start since - number of seconds since FPM has started;
559+; accepted conn - the number of request accepted by the pool;
560+; listen queue - the number of request in the queue of pending
561+; connections (see backlog in listen(2));
562+; max listen queue - the maximum number of requests in the queue
563+; of pending connections since FPM has started;
564+; listen queue len - the size of the socket queue of pending connections;
565+; idle processes - the number of idle processes;
566+; active processes - the number of active processes;
567+; total processes - the number of idle + active processes;
568+; max active processes - the maximum number of active processes since FPM
569+; has started;
570+; max children reached - number of times, the process limit has been reached,
571+; when pm tries to start more children (works only for
572+; pm 'dynamic' and 'ondemand');
573+; Value are updated in real time.
574+; Example output:
575+; pool: www
576+; process manager: static
577+; start time: 01/Jul/2011:17:53:49 +0200
578+; start since: 62636
579+; accepted conn: 190460
580+; listen queue: 0
581+; max listen queue: 1
582+; listen queue len: 42
583+; idle processes: 4
584+; active processes: 11
585+; total processes: 15
586+; max active processes: 12
587+; max children reached: 0
588+;
589+; By default the status page output is formatted as text/plain. Passing either
590+; 'html', 'xml' or 'json' in the query string will return the corresponding
591+; output syntax. Example:
592+; http://www.foo.bar/status
593+; http://www.foo.bar/status?json
594+; http://www.foo.bar/status?html
595+; http://www.foo.bar/status?xml
596+;
597+; By default the status page only outputs short status. Passing 'full' in the
598+; query string will also return status for each pool process.
599+; Example:
600+; http://www.foo.bar/status?full
601+; http://www.foo.bar/status?json&full
602+; http://www.foo.bar/status?html&full
603+; http://www.foo.bar/status?xml&full
604+; The Full status returns for each process:
605+; pid - the PID of the process;
606+; state - the state of the process (Idle, Running, ...);
607+; start time - the date and time the process has started;
608+; start since - the number of seconds since the process has started;
609+; requests - the number of requests the process has served;
610+; request duration - the duration in µs of the requests;
611+; request method - the request method (GET, POST, ...);
612+; request URI - the request URI with the query string;
613+; content length - the content length of the request (only with POST);
614+; user - the user (PHP_AUTH_USER) (or '-' if not set);
615+; script - the main script called (or '-' if not set);
616+; last request cpu - the %cpu the last request consumed
617+; it's always 0 if the process is not in Idle state
618+; because CPU calculation is done when the request
619+; processing has terminated;
620+; last request memory - the max amount of memory the last request consumed
621+; it's always 0 if the process is not in Idle state
622+; because memory calculation is done when the request
623+; processing has terminated;
624+; If the process is in Idle state, then informations are related to the
625+; last request the process has served. Otherwise informations are related to
626+; the current request being served.
627+; Example output:
628+; ************************
629+; pid: 31330
630+; state: Running
631+; start time: 01/Jul/2011:17:53:49 +0200
632+; start since: 63087
633+; requests: 12808
634+; request duration: 1250261
635+; request method: GET
636+; request URI: /test_mem.php?N=10000
637+; content length: 0
638+; user: -
639+; script: /home/fat/web/docs/php/test_mem.php
640+; last request cpu: 0.00
641+; last request memory: 0
642+;
643+; Note: There is a real-time FPM status monitoring sample web page available
644+; It's available in: @EXPANDED_DATADIR@/fpm/status.html
645+;
646+; Note: The value must start with a leading slash (/). The value can be
647+; anything, but it may not be a good idea to use the .php extension or it
648+; may conflict with a real PHP file.
649+; Default Value: not set
650+;pm.status_path = /status
651+
652+; The ping URI to call the monitoring page of FPM. If this value is not set, no
653+; URI will be recognized as a ping page. This could be used to test from outside
654+; that FPM is alive and responding, or to
655+; - create a graph of FPM availability (rrd or such);
656+; - remove a server from a group if it is not responding (load balancing);
657+; - trigger alerts for the operating team (24/7).
658+; Note: The value must start with a leading slash (/). The value can be
659+; anything, but it may not be a good idea to use the .php extension or it
660+; may conflict with a real PHP file.
661+; Default Value: not set
662+;ping.path = /ping
663+
664+; This directive may be used to customize the response of a ping request. The
665+; response is formatted as text/plain with a 200 response code.
666+; Default Value: pong
667+;ping.response = pong
668+
669+; The access log file
670+; Default: not set
671+;access.log = log/$pool.access.log
672+
673+; The access log format.
674+; The following syntax is allowed
675+; %%: the '%' character
676+; %C: %CPU used by the request
677+; it can accept the following format:
678+; - %{user}C for user CPU only
679+; - %{system}C for system CPU only
680+; - %{total}C for user + system CPU (default)
681+; %d: time taken to serve the request
682+; it can accept the following format:
683+; - %{seconds}d (default)
684+; - %{miliseconds}d
685+; - %{mili}d
686+; - %{microseconds}d
687+; - %{micro}d
688+; %e: an environment variable (same as $_ENV or $_SERVER)
689+; it must be associated with embraces to specify the name of the env
690+; variable. Some exemples:
691+; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
692+; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
693+; %f: script filename
694+; %l: content-length of the request (for POST request only)
695+; %m: request method
696+; %M: peak of memory allocated by PHP
697+; it can accept the following format:
698+; - %{bytes}M (default)
699+; - %{kilobytes}M
700+; - %{kilo}M
701+; - %{megabytes}M
702+; - %{mega}M
703+; %n: pool name
704+; %o: output header
705+; it must be associated with embraces to specify the name of the header:
706+; - %{Content-Type}o
707+; - %{X-Powered-By}o
708+; - %{Transfert-Encoding}o
709+; - ....
710+; %p: PID of the child that serviced the request
711+; %P: PID of the parent of the child that serviced the request
712+; %q: the query string
713+; %Q: the '?' character if query string exists
714+; %r: the request URI (without the query string, see %q and %Q)
715+; %R: remote IP address
716+; %s: status (response code)
717+; %t: server time the request was received
718+; it can accept a strftime(3) format:
719+; %d/%b/%Y:%H:%M:%S %z (default)
720+; %T: time the log has been written (the request has finished)
721+; it can accept a strftime(3) format:
722+; %d/%b/%Y:%H:%M:%S %z (default)
723+; %u: remote user
724+;
725+; Default: "%R - %u %t \"%m %r\" %s"
726+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
727+
728+; The log file for slow requests
729+; Default Value: not set
730+; Note: slowlog is mandatory if request_slowlog_timeout is set
731+;slowlog = log/$pool.log.slow
732+
733+; The timeout for serving a single request after which a PHP backtrace will be
734+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
735+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
736+; Default Value: 0
737+;request_slowlog_timeout = 0
738+
739+; The timeout for serving a single request after which the worker process will
740+; be killed. This option should be used when the 'max_execution_time' ini option
741+; does not stop script execution for some reason. A value of '0' means 'off'.
742+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
743+; Default Value: 0
744+;request_terminate_timeout = 0
745+
746+; Set open file descriptor rlimit.
747+; Default Value: system defined value
748+;rlimit_files = 1024
749+
750+; Set max core size rlimit.
751+; Possible Values: 'unlimited' or an integer greater or equal to 0
752+; Default Value: system defined value
753+;rlimit_core = 0
754+
755+; Chroot to this directory at the start. This value must be defined as an
756+; absolute path. When this value is not set, chroot is not used.
757+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
758+; of its subdirectories. If the pool prefix is not set, the global prefix
759+; will be used instead.
760+; Note: chrooting is a great security feature and should be used whenever
761+; possible. However, all PHP paths will be relative to the chroot
762+; (error_log, sessions.save_path, ...).
763+; Default Value: not set
764+;chroot =
765+
766+; Chdir to this directory at the start.
767+; Note: relative path can be used.
768+; Default Value: current directory or / when chroot
769+;chdir = /var/www
770+
771+; Redirect worker stdout and stderr into main error log. If not set, stdout and
772+; stderr will be redirected to /dev/null according to FastCGI specs.
773+; Note: on highloaded environement, this can cause some delay in the page
774+; process time (several ms).
775+; Default Value: no
776+;catch_workers_output = yes
777+
8d42644e
ER
778+; Clear environment in FPM workers
779+; Prevents arbitrary environment variables from reaching FPM worker processes
780+; by clearing the environment in workers before env vars specified in this
781+; pool configuration are added.
782+; Setting to "no" will make all environment variables available to PHP code
783+; via getenv(), $_ENV and $_SERVER.
784+; Default Value: yes
785+;clear_env = no
786+
b604e307
ER
787+; Limits the extensions of the main script FPM will allow to parse. This can
788+; prevent configuration mistakes on the web server side. You should only limit
789+; FPM to .php extensions to prevent malicious users to use other extensions to
790+; exectute php code.
791+; Note: set an empty value to allow all extensions.
792+; Default Value: .php
793+;security.limit_extensions = .php .php3 .php4 .php5
794+
795+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
796+; the current environment.
797+; Default Value: clean env
798+;env[HOSTNAME] = $HOSTNAME
8851ace1 799+;env[PATH] = /usr/local/bin:/usr/bin:/bin
b604e307
ER
800+;env[TMP] = /tmp
801+;env[TMPDIR] = /tmp
802+;env[TEMP] = /tmp
803+
804+; Additional php.ini defines, specific to this pool of workers. These settings
805+; overwrite the values previously defined in the php.ini. The directives are the
806+; same as the PHP SAPI:
807+; php_value/php_flag - you can set classic ini defines which can
808+; be overwritten from PHP call 'ini_set'.
809+; php_admin_value/php_admin_flag - these directives won't be overwritten by
810+; PHP call 'ini_set'
811+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
812+
813+; Defining 'extension' will load the corresponding shared extension from
814+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
815+; overwrite previously defined php.ini values, but will append the new value
816+; instead.
817+
818+; Note: path INI options can be relative and will be expanded with the prefix
819+; (pool, global or @prefix@)
820+
821+; Default Value: nothing is defined by default except the values in php.ini and
822+; specified at startup with the -d argument
823+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
824+;php_flag[display_errors] = off
825+;php_admin_value[error_log] = /var/log/fpm-php.www.log
826+;php_admin_flag[log_errors] = on
827+;php_admin_value[memory_limit] = 32M
b604e307
ER
828--- php-5.5.7/sapi/fpm/config.m4~ 2013-12-16 17:57:03.000000000 +0200
829+++ php-5.5.7/sapi/fpm/config.m4 2013-12-16 18:00:34.936527309 +0200
830@@ -609,7 +609,7 @@
831
832 PHP_ADD_BUILD_DIR(sapi/fpm/fpm)
833 PHP_ADD_BUILD_DIR(sapi/fpm/fpm/events)
834- PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
835+ PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/php-fpm.conf-d sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
836 PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
837
838 SAPI_FPM_PATH=sapi/fpm/php-fpm
8851ace1
ER
839--- php-5.6.2/sapi/fpm/Makefile.frag~ 2014-10-15 15:59:32.000000000 +0300
840+++ php-5.6.2/sapi/fpm/Makefile.frag 2014-10-27 08:12:57.402883790 +0200
b604e307
ER
841@@ -11,8 +11,9 @@
842 @$(INSTALL) -m 0755 $(SAPI_FPM_PATH) $(INSTALL_ROOT)$(sbindir)/$(program_prefix)php-fpm$(program_suffix)$(EXEEXT)
843
844 @echo "Installing PHP FPM config: $(INSTALL_ROOT)$(sysconfdir)/" && \
845- $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir) || :
846+ $(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)/fpm.d || :
8851ace1
ER
847 @$(INSTALL_DATA) sapi/fpm/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf.default || :
848+ @$(INSTALL_DATA) sapi/fpm/php-fpm.conf-d $(INSTALL_ROOT)$(sysconfdir)/fpm.d/www.conf.default || :
b604e307
ER
849
850 @echo "Installing PHP FPM man page: $(INSTALL_ROOT)$(mandir)/man8/"
851 @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
This page took 0.135422 seconds and 4 git commands to generate.