annotate modules/php/templates/fpm/php-fpm.conf.erb @ 482:d83de9b3a62b default tip

Update hiera.yaml within Puppet config Forgot that we manage it from here. Now has content to match new packages
author IBBoard <dev@ibboard.co.uk>
date Fri, 30 Aug 2024 16:10:36 +0100
parents 3fce34f642f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
386
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 ;;;;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 ; FPM Configuration ;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 ;;;;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 ; All relative paths in this configuration file are relative to PHP's install
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 ; prefix (/usr). This prefix can be dynamically changed by using the
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 ; '-p' argument from the command line.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 ; Include one or more files. If glob(3) exists, it is used to include a bunch of
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 ; files from a glob(3) pattern. This directive can be used everywhere in the
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 ; file.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 ; Relative path can also be used. They will be prefixed by:
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 ; - the global prefix if it's been set (-p argument)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 ; - /usr otherwise
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 ;include=/etc/php5/fpm/*.conf
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 ;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 ; Global Options ;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 ;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 [global]
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 ; Pid file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 ; Note: the default prefix is /var
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 ; Default Value: none
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 pid = <%= @pid_file %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 ; Error log file
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 ; If it's set to "syslog", log is sent to syslogd instead of being written
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 ; in a local file.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 ; Note: the default prefix is /var
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 ; Default Value: log/php-fpm.log
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 error_log = <%= @error_log %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 ; syslog_facility is used to specify what type of program is logging the
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 ; message. This lets syslogd specify that messages from different facilities
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 ; will be handled differently.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 ; Default Value: daemon
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 syslog.facility = <%= @syslog_facility %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 ; syslog_ident is prepended to every message. If you have multiple FPM
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 ; instances running on the same server, you can change the default value
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 ; which must suit common needs.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 ; Default Value: php-fpm
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 syslog.ident = <%= @syslog_ident %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 ; Log level
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 ; Possible Values: alert, error, warning, notice, debug
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 ; Default Value: notice
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 log_level = <%= @log_level %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 ; interval set by emergency_restart_interval then FPM will restart. A value
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 ; of '0' means 'Off'.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 ; Default Value: 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 emergency_restart_threshold = <%= @emergency_restart_threshold %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 ; Interval of time used by emergency_restart_interval to determine when
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 ; a graceful restart will be initiated. This can be useful to work around
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60 ; accidental corruptions in an accelerator's shared memory.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 ; Default Unit: seconds
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 ; Default Value: 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 emergency_restart_interval = <%= @emergency_restart_interval %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
65
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 ; Time limit for child processes to wait for a reaction on signals from master.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67 ; Available units: s(econds), m(inutes), h(ours), or d(ays)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 ; Default Unit: seconds
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 ; Default Value: 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70 process_control_timeout = <%= @process_control_timeout %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72 ; The maximum number of processes FPM will fork. This has been design to control
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 ; the global number of processes when using dynamic PM within a lot of pools.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 ; Use it with caution.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 ; Note: A value of 0 indicates no limit
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76 ; Default Value: 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 process.max = <%= @process_max %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
79 ; Specify the nice(2) priority to apply to the master process (only if set)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
80 ; The value can vary from -19 (highest priority) to 20 (lower priority)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 ; Note: - It will only work if the FPM master process is launched as root
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 ; - The pool process will inherit the master process priority
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 ; unless it specified otherwise
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 ; Default Value: no set
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 ; process.priority = -19
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 ; Default Value: yes
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 ;daemonize = yes
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91 ; Set open file descriptor rlimit for the master process.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 ; Default Value: system defined value
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
93 <% if @rlimit_files -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94 rlimit_files = <%= @rlimit_files %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 <% else -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 ;rlimit_files = 1024
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 <% end -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 ; Set max core size rlimit for the master process.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 ; Possible Values: 'unlimited' or an integer greater or equal to 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
101 ; Default Value: system defined value
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 ;rlimit_core = 0
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 ; Specify the event mechanism FPM will use. The following is available:
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 ; - select (any POSIX os)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 ; - poll (any POSIX os)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 ; - epoll (linux >= 2.5.44)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108 ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
109 ; - /dev/poll (Solaris >= 7)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 ; - port (Solaris >= 10)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 ; Default Value: not set (auto detection)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 ;events.mechanism = epoll
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 ; When FPM is build with systemd integration, specify the interval,
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 ; in second, between health report notification to systemd.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 ; Set to 0 to disable.
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
117 ; Available Units: s(econds), m(inutes), h(ours)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
118 ; Default Unit: seconds
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119 ; Default value: 10
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 <% if @systemd_interval -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
121 systemd_interval = <%= @systemd_interval %>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 <% else -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123 ;systemd_interval = 10
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124 <% end -%>
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 ;;;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 ; Pool Definitions ;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
128 ;;;;;;;;;;;;;;;;;;;;
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
129
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
130 ; Multiple pools of child processes may be started with different listening
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
131 ; ports and different management options. The name of the pool will be
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132 ; used in logs and stats. There is no limitation on the number of pools which
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
133 ; FPM can handle. Your system will tell you anyway :)
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
134
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135 ; To configure the pools it is recommended to have one .conf file per
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 ; pool in the following directory:
3fce34f642f1 Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 include=<%= @pool_base_dir %>/*.conf