]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - dev-lang/php/files/php-fpm-r1.conf
Add an "any slot" dependency operator for dev-db/postgresql.
[mjo-overlay.git] / dev-lang / php / files / php-fpm-r1.conf
1 ;;;;;;;;;;;;;;;;;;;;;
2 ; FPM Configuration ;
3 ;;;;;;;;;;;;;;;;;;;;;
4
5 ; All relative paths in this configuration file are relative to PHP's install
6 ; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the
7 ; '-p' argument from the command line.
8
9 ; Include one or more files. If glob(3) exists, it is used to include a bunch of
10 ; files from a glob(3) pattern. This directive can be used everywhere in the
11 ; file.
12 ; Relative path can also be used. They will be prefixed by:
13 ; - the global prefix if it's been set (-p arguement)
14 ; - /usr/lib/php5.3 otherwise
15 ;include=/etc/php/fpm-php5.3/fpm.d/*.conf
16
17 ;;;;;;;;;;;;;;;;;;
18 ; Global Options ;
19 ;;;;;;;;;;;;;;;;;;
20
21 [global]
22 ; Pid file
23 ; Note: the default prefix is /var/lib
24 ; Default Value: none
25 ; Warning: pid file is overriden by the Gentoo init script.
26 ; FPM will refuse to start if you uncomment this settingi and make use of the
27 ; init script.
28 ; pid = /var/run/php-fpm.pid
29
30 ; Error log file
31 ; Note: the default prefix is /var/lib
32 ; Default Value: log/php-fpm.log
33 error_log = /var/log/php-fpm.log
34
35 ; Log level
36 ; Possible Values: alert, error, warning, notice, debug
37 ; Default Value: notice
38 ;log_level = notice
39
40 ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
41 ; interval set by emergency_restart_interval then FPM will restart. A value
42 ; of '0' means 'Off'.
43 ; Default Value: 0
44 ;emergency_restart_threshold = 0
45
46 ; Interval of time used by emergency_restart_interval to determine when
47 ; a graceful restart will be initiated. This can be useful to work around
48 ; accidental corruptions in an accelerator's shared memory.
49 ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
50 ; Default Unit: seconds
51 ; Default Value: 0
52 ;emergency_restart_interval = 0
53
54 ; Time limit for child processes to wait for a reaction on signals from master.
55 ; Available units: s(econds), m(inutes), h(ours), or d(ays)
56 ; Default Unit: seconds
57 ; Default Value: 0
58 ;process_control_timeout = 0
59
60 ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
61 ; Default Value: yes
62 ;daemonize = yes
63
64 ;;;;;;;;;;;;;;;;;;;;
65 ; Pool Definitions ;
66 ;;;;;;;;;;;;;;;;;;;;
67
68 ; Multiple pools of child processes may be started with different listening
69 ; ports and different management options. The name of the pool will be
70 ; used in logs and stats. There is no limitation on the number of pools which
71 ; FPM can handle. Your system will tell you anyway :)
72
73 ; Start a new pool named 'www'.
74 ; the variable $pool can we used in any directive and will be replaced by the
75 ; pool name ('www' here)
76 [www]
77
78 ; Per pool prefix
79 ; It only applies on the following directives:
80 ; - 'slowlog'
81 ; - 'listen' (unixsocket)
82 ; - 'chroot'
83 ; - 'chdir'
84 ; - 'php_values'
85 ; - 'php_admin_values'
86 ; When not set, the global prefix (or /usr/lib/php5.3) applies instead.
87 ; Note: This directive can also be relative to the global prefix.
88 ; Default Value: none
89 ;prefix = /path/to/pools/$pool
90
91 ; The address on which to accept FastCGI requests.
92 ; Valid syntaxes are:
93 ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
94 ; a specific port;
95 ; 'port' - to listen on a TCP socket to all addresses on a
96 ; specific port;
97 ; '/path/to/unix/socket' - to listen on a unix socket.
98 ; Note: This value is mandatory.
99 listen = 127.0.0.1:9000
100
101 ; Set listen(2) backlog. A value of '-1' means unlimited.
102 ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
103 ;listen.backlog = -1
104
105 ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
106 ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
107 ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
108 ; must be separated by a comma. If this value is left blank, connections will be
109 ; accepted from any ip address.
110 ; Default Value: any
111 ;listen.allowed_clients = 127.0.0.1
112
113 ; Set permissions for unix socket, if one is used. In Linux, read/write
114 ; permissions must be set in order to allow connections from a web server. Many
115 ; BSD-derived systems allow connections regardless of permissions.
116 ; Default Values: user and group are set as the running user
117 ; mode is set to 0666
118 ;listen.owner = nobody
119 ;listen.group = nobody
120 ;listen.mode = 0666
121
122 ; Unix user/group of processes
123 ; Note: The user is mandatory. If the group is not set, the default user's group
124 ; will be used.
125 user = nobody
126 group = nobody
127
128 ; Choose how the process manager will control the number of child processes.
129 ; Possible Values:
130 ; static - a fixed number (pm.max_children) of child processes;
131 ; dynamic - the number of child processes are set dynamically based on the
132 ; following directives:
133 ; pm.max_children - the maximum number of children that can
134 ; be alive at the same time.
135 ; pm.start_servers - the number of children created on startup.
136 ; pm.min_spare_servers - the minimum number of children in 'idle'
137 ; state (waiting to process). If the number
138 ; of 'idle' processes is less than this
139 ; number then some children will be created.
140 ; pm.max_spare_servers - the maximum number of children in 'idle'
141 ; state (waiting to process). If the number
142 ; of 'idle' processes is greater than this
143 ; number then some children will be killed.
144 ; Note: This value is mandatory.
145 pm = dynamic
146
147 ; The number of child processes to be created when pm is set to 'static' and the
148 ; maximum number of child processes to be created when pm is set to 'dynamic'.
149 ; This value sets the limit on the number of simultaneous requests that will be
150 ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
151 ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
152 ; CGI.
153 ; Note: Used when pm is set to either 'static' or 'dynamic'
154 ; Note: This value is mandatory.
155 pm.max_children = 50
156
157 ; The number of child processes created on startup.
158 ; Note: Used only when pm is set to 'dynamic'
159 ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
160 ;pm.start_servers = 20
161
162 ; The desired minimum number of idle server processes.
163 ; Note: Used only when pm is set to 'dynamic'
164 ; Note: Mandatory when pm is set to 'dynamic'
165 pm.min_spare_servers = 5
166
167 ; The desired maximum number of idle server processes.
168 ; Note: Used only when pm is set to 'dynamic'
169 ; Note: Mandatory when pm is set to 'dynamic'
170 pm.max_spare_servers = 35
171
172 ; The number of requests each child process should execute before respawning.
173 ; This can be useful to work around memory leaks in 3rd party libraries. For
174 ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
175 ; Default Value: 0
176 ;pm.max_requests = 500
177
178 ; The URI to view the FPM status page. If this value is not set, no URI will be
179 ; recognized as a status page. By default, the status page shows the following
180 ; information:
181 ; accepted conn - the number of request accepted by the pool;
182 ; pool - the name of the pool;
183 ; process manager - static or dynamic;
184 ; idle processes - the number of idle processes;
185 ; active processes - the number of active processes;
186 ; total processes - the number of idle + active processes.
187 ; max children reached - number of times, the process limit has been reached,
188 ; when pm tries to start more children (works only for
189 ; pm 'dynamic')
190 ; The values of 'idle processes', 'active processes' and 'total processes' are
191 ; updated each second. The value of 'accepted conn' is updated in real time.
192 ; Example output:
193 ; accepted conn: 12073
194 ; pool: www
195 ; process manager: static
196 ; idle processes: 35
197 ; active processes: 65
198 ; total processes: 100
199 ; max children reached: 1
200 ; By default the status page output is formatted as text/plain. Passing either
201 ; 'html' or 'json' as a query string will return the corresponding output
202 ; syntax. Example:
203 ; http://www.foo.bar/status
204 ; http://www.foo.bar/status?json
205 ; http://www.foo.bar/status?html
206 ; Note: The value must start with a leading slash (/). The value can be
207 ; anything, but it may not be a good idea to use the .php extension or it
208 ; may conflict with a real PHP file.
209 ; Default Value: not set
210 ;pm.status_path = /status
211
212 ; The ping URI to call the monitoring page of FPM. If this value is not set, no
213 ; URI will be recognized as a ping page. This could be used to test from outside
214 ; that FPM is alive and responding, or to
215 ; - create a graph of FPM availability (rrd or such);
216 ; - remove a server from a group if it is not responding (load balancing);
217 ; - trigger alerts for the operating team (24/7).
218 ; Note: The value must start with a leading slash (/). The value can be
219 ; anything, but it may not be a good idea to use the .php extension or it
220 ; may conflict with a real PHP file.
221 ; Default Value: not set
222 ;ping.path = /ping
223
224 ; This directive may be used to customize the response of a ping request. The
225 ; response is formatted as text/plain with a 200 response code.
226 ; Default Value: pong
227 ;ping.response = pong
228
229 ; The timeout for serving a single request after which the worker process will
230 ; be killed. This option should be used when the 'max_execution_time' ini option
231 ; does not stop script execution for some reason. A value of '0' means 'off'.
232 ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
233 ; Default Value: 0
234 ;request_terminate_timeout = 0
235
236 ; The timeout for serving a single request after which a PHP backtrace will be
237 ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
238 ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
239 ; Default Value: 0
240 ;request_slowlog_timeout = 0
241
242 ; The log file for slow requests
243 ; Default Value: not set
244 ; Note: slowlog is mandatory if request_slowlog_timeout is set
245 ;slowlog = /var/log/php-fpm-$pool.log.slow
246
247 ; Set open file descriptor rlimit.
248 ; Default Value: system defined value
249 ;rlimit_files = 1024
250
251 ; Set max core size rlimit.
252 ; Possible Values: 'unlimited' or an integer greater or equal to 0
253 ; Default Value: system defined value
254 ;rlimit_core = 0
255
256 ; Chroot to this directory at the start. This value must be defined as an
257 ; absolute path. When this value is not set, chroot is not used.
258 ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
259 ; of its subdirectories. If the pool prefix is not set, the global prefix
260 ; will be used instead.
261 ; Note: chrooting is a great security feature and should be used whenever
262 ; possible. However, all PHP paths will be relative to the chroot
263 ; (error_log, sessions.save_path, ...).
264 ; Default Value: not set
265 ;chroot =
266
267 ; Chdir to this directory at the start.
268 ; Note: relative path can be used.
269 ; Default Value: current directory or / when chroot
270 ;chdir = /var/www
271
272 ; Redirect worker stdout and stderr into main error log. If not set, stdout and
273 ; stderr will be redirected to /dev/null according to FastCGI specs.
274 ; Note: on highloaded environement, this can cause some delay in the page
275 ; process time (several ms).
276 ; Default Value: no
277 ;catch_workers_output = yes
278
279 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
280 ; the current environment.
281 ; Default Value: clean env
282 ;env[HOSTNAME] = $HOSTNAME
283 ;env[PATH] = /usr/local/bin:/usr/bin:/bin
284 ;env[TMP] = /tmp
285 ;env[TMPDIR] = /tmp
286 ;env[TEMP] = /tmp
287
288 ; Additional php.ini defines, specific to this pool of workers. These settings
289 ; overwrite the values previously defined in the php.ini. The directives are the
290 ; same as the PHP SAPI:
291 ; php_value/php_flag - you can set classic ini defines which can
292 ; be overwritten from PHP call 'ini_set'.
293 ; php_admin_value/php_admin_flag - these directives won't be overwritten by
294 ; PHP call 'ini_set'
295 ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
296
297 ; Defining 'extension' will load the corresponding shared extension from
298 ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
299 ; overwrite previously defined php.ini values, but will append the new value
300 ; instead.
301
302 ; Note: path INI options can be relative and will be expanded with the prefix
303 ; (pool, global or /usr/lib/php5.3)
304
305 ; Default Value: nothing is defined by default except the values in php.ini and
306 ; specified at startup with the -d argument
307 ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
308 ;php_flag[display_errors] = off
309 ;php_admin_value[error_log] = /var/log/fpm-php.www.log
310 ;php_admin_flag[log_errors] = on
311 ;php_admin_value[memory_limit] = 32M