|
Link Here
|
| 1 |
From e767189535ff02cee43dfefecfdb5d36b3c81447 Mon Sep 17 00:00:00 2001 |
| 2 |
From: Robin Gloster <robin@loc-com.de> |
| 3 |
Date: Sun, 23 Mar 2014 17:43:20 +0100 |
| 4 |
Subject: [PATCH 1/3] add IPv6 support to php-fpm |
| 5 |
|
| 6 |
--- |
| 7 |
sapi/fpm/fpm/fpm_sockets.c | 82 +++++++++++++++++++++++----------------------- |
| 8 |
sapi/fpm/fpm/fpm_sockets.h | 6 ---- |
| 9 |
sapi/fpm/tests/003.phpt | 53 ++++++++++++++++++++++++++++++ |
| 10 |
3 files changed, 94 insertions(+), 47 deletions(-) |
| 11 |
create mode 100644 sapi/fpm/tests/003.phpt |
| 12 |
|
| 13 |
diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c |
| 14 |
index e056565..583b1fa 100644 |
| 15 |
--- a/sapi/fpm/fpm/fpm_sockets.c |
| 16 |
+++ b/sapi/fpm/fpm/fpm_sockets.c |
| 17 |
@@ -39,29 +39,6 @@ struct listening_socket_s { |
| 18 |
|
| 19 |
static struct fpm_array_s sockets_list; |
| 20 |
|
| 21 |
-static int fpm_sockets_resolve_af_inet(char *node, char *service, struct sockaddr_in *addr) /* {{{ */ |
| 22 |
-{ |
| 23 |
- struct addrinfo *res; |
| 24 |
- struct addrinfo hints; |
| 25 |
- int ret; |
| 26 |
- |
| 27 |
- memset(&hints, 0, sizeof(hints)); |
| 28 |
- hints.ai_family = AF_INET; |
| 29 |
- ret = getaddrinfo(node, service, &hints, &res); |
| 30 |
- |
| 31 |
- if (ret != 0) { |
| 32 |
- zlog(ZLOG_ERROR, "can't resolve hostname '%s%s%s': getaddrinfo said: %s%s%s\n", |
| 33 |
- node, service ? ":" : "", service ? service : "", |
| 34 |
- gai_strerror(ret), ret == EAI_SYSTEM ? ", system error: " : "", ret == EAI_SYSTEM ? strerror(errno) : ""); |
| 35 |
- return -1; |
| 36 |
- } |
| 37 |
- |
| 38 |
- *addr = *(struct sockaddr_in *) res->ai_addr; |
| 39 |
- freeaddrinfo(res); |
| 40 |
- return 0; |
| 41 |
-} |
| 42 |
-/* }}} */ |
| 43 |
- |
| 44 |
enum { FPM_GET_USE_SOCKET = 1, FPM_STORE_SOCKET = 2, FPM_STORE_USE_SOCKET = 3 }; |
| 45 |
|
| 46 |
static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */ |
| 47 |
@@ -98,14 +75,24 @@ static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */ |
| 48 |
} |
| 49 |
/* }}} */ |
| 50 |
|
| 51 |
+static void *fpm_get_in_addr(struct sockaddr *sa) /* {{{ */ |
| 52 |
+{ |
| 53 |
+ if (sa->sa_family == AF_INET) { |
| 54 |
+ return &(((struct sockaddr_in*)sa)->sin_addr); |
| 55 |
+ } |
| 56 |
+ |
| 57 |
+ return &(((struct sockaddr_in6*)sa)->sin6_addr); |
| 58 |
+} |
| 59 |
+/* }}} */ |
| 60 |
+ |
| 61 |
static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op) /* {{{ */ |
| 62 |
{ |
| 63 |
if (key == NULL) { |
| 64 |
switch (type) { |
| 65 |
case FPM_AF_INET : { |
| 66 |
struct sockaddr_in *sa_in = (struct sockaddr_in *) sa; |
| 67 |
- key = alloca(sizeof("xxx.xxx.xxx.xxx:ppppp")); |
| 68 |
- sprintf(key, "%u.%u.%u.%u:%u", IPQUAD(&sa_in->sin_addr), (unsigned int) ntohs(sa_in->sin_port)); |
| 69 |
+ key = alloca(INET6_ADDRSTRLEN); |
| 70 |
+ inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key); |
| 71 |
break; |
| 72 |
} |
| 73 |
|
| 74 |
@@ -254,11 +241,14 @@ enum fpm_address_domain fpm_sockets_domain_from_address(char *address) /* {{{ */ |
| 75 |
|
| 76 |
static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */ |
| 77 |
{ |
| 78 |
- struct sockaddr_in sa_in; |
| 79 |
+ struct addrinfo hints, *servinfo, *p; |
| 80 |
char *dup_address = strdup(wp->config->listen_address); |
| 81 |
- char *port_str = strchr(dup_address, ':'); |
| 82 |
+ char *port_str = strrchr(dup_address, ':'); |
| 83 |
char *addr = NULL; |
| 84 |
+ int addr_len; |
| 85 |
int port = 0; |
| 86 |
+ int sock; |
| 87 |
+ int status; |
| 88 |
|
| 89 |
if (port_str) { /* this is host:port pair */ |
| 90 |
*port_str++ = '\0'; |
| 91 |
@@ -274,23 +264,33 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* |
| 92 |
return -1; |
| 93 |
} |
| 94 |
|
| 95 |
- memset(&sa_in, 0, sizeof(sa_in)); |
| 96 |
+ // strip brackets from address for getaddrinfo |
| 97 |
+ addr_len = strlen(addr); |
| 98 |
+ if (addr[0] == '[' && addr[addr_len - 1] == ']') { |
| 99 |
+ addr[addr_len - 1] = '\0'; |
| 100 |
+ addr++; |
| 101 |
+ } |
| 102 |
|
| 103 |
- if (addr) { |
| 104 |
- sa_in.sin_addr.s_addr = inet_addr(addr); |
| 105 |
- if (sa_in.sin_addr.s_addr == INADDR_NONE) { /* do resolve */ |
| 106 |
- if (0 > fpm_sockets_resolve_af_inet(addr, NULL, &sa_in)) { |
| 107 |
- return -1; |
| 108 |
- } |
| 109 |
- zlog(ZLOG_NOTICE, "address '%s' resolved as %u.%u.%u.%u", addr, IPQUAD(&sa_in.sin_addr)); |
| 110 |
- } |
| 111 |
- } else { |
| 112 |
- sa_in.sin_addr.s_addr = htonl(INADDR_ANY); |
| 113 |
+ memset(&hints, 0, sizeof hints); |
| 114 |
+ hints.ai_family = AF_UNSPEC; |
| 115 |
+ hints.ai_socktype = SOCK_STREAM; |
| 116 |
+ |
| 117 |
+ if ((status = getaddrinfo(addr, port_str, &hints, &servinfo)) != 0) { |
| 118 |
+ zlog(ZLOG_ERROR, "getaddrinfo: %s\n", gai_strerror(status)); |
| 119 |
+ return -1; |
| 120 |
} |
| 121 |
- sa_in.sin_family = AF_INET; |
| 122 |
- sa_in.sin_port = htons(port); |
| 123 |
+ |
| 124 |
free(dup_address); |
| 125 |
- return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_in, sizeof(struct sockaddr_in)); |
| 126 |
+ |
| 127 |
+ for (p = servinfo; p != NULL; p = p->ai_next) { |
| 128 |
+ if ((sock = fpm_sockets_get_listening_socket(wp, p->ai_addr, p->ai_addrlen)) != -1) { |
| 129 |
+ break; |
| 130 |
+ } |
| 131 |
+ } |
| 132 |
+ |
| 133 |
+ freeaddrinfo(servinfo); |
| 134 |
+ |
| 135 |
+ return sock; |
| 136 |
} |
| 137 |
/* }}} */ |
| 138 |
|
| 139 |
diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h |
| 140 |
index 121c016..446c78e 100644 |
| 141 |
--- a/sapi/fpm/fpm/fpm_sockets.h |
| 142 |
+++ b/sapi/fpm/fpm/fpm_sockets.h |
| 143 |
@@ -45,10 +45,4 @@ static inline int fd_set_blocked(int fd, int blocked) /* {{{ */ |
| 144 |
} |
| 145 |
/* }}} */ |
| 146 |
|
| 147 |
-#define IPQUAD(sin_addr) \ |
| 148 |
- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[0], \ |
| 149 |
- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[1], \ |
| 150 |
- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[2], \ |
| 151 |
- (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[3] |
| 152 |
- |
| 153 |
#endif |
| 154 |
diff --git a/sapi/fpm/tests/003.phpt b/sapi/fpm/tests/003.phpt |
| 155 |
new file mode 100644 |
| 156 |
index 0000000..389cb24 |
| 157 |
--- /dev/null |
| 158 |
+++ b/sapi/fpm/tests/003.phpt |
| 159 |
@@ -0,0 +1,53 @@ |
| 160 |
+--TEST-- |
| 161 |
+FPM: Test IPv6 support |
| 162 |
+--SKIPIF-- |
| 163 |
+<?php include "skipif.inc"; ?> |
| 164 |
+--FILE-- |
| 165 |
+<?php |
| 166 |
+ |
| 167 |
+include "include.inc"; |
| 168 |
+ |
| 169 |
+$logfile = dirname(__FILE__).'/php-fpm.log.tmp'; |
| 170 |
+ |
| 171 |
+$cfg = <<<EOT |
| 172 |
+[global] |
| 173 |
+error_log = $logfile |
| 174 |
+[unconfined] |
| 175 |
+listen = [::1]:9000 |
| 176 |
+pm = dynamic |
| 177 |
+pm.max_children = 5 |
| 178 |
+pm.start_servers = 2 |
| 179 |
+pm.min_spare_servers = 1 |
| 180 |
+pm.max_spare_servers = 3 |
| 181 |
+EOT; |
| 182 |
+ |
| 183 |
+$fpm = run_fpm($cfg, $tail); |
| 184 |
+if (is_resource($fpm)) { |
| 185 |
+ var_dump(fgets($tail)); |
| 186 |
+ var_dump(fgets($tail)); |
| 187 |
+ $i = 0; |
| 188 |
+ while (($i++ < 30) && !($fp = fsockopen('[::1]', 9000))) { |
| 189 |
+ usleep(10000); |
| 190 |
+ } |
| 191 |
+ if ($fp) { |
| 192 |
+ echo "Done\n"; |
| 193 |
+ fclose($fp); |
| 194 |
+ } |
| 195 |
+ proc_terminate($fpm); |
| 196 |
+ stream_get_contents($tail); |
| 197 |
+ fclose($tail); |
| 198 |
+ proc_close($fpm); |
| 199 |
+} |
| 200 |
+ |
| 201 |
+?> |
| 202 |
+--EXPECTF-- |
| 203 |
+string(%d) "[%d-%s-%d %d:%d:%d] NOTICE: fpm is running, pid %d |
| 204 |
+" |
| 205 |
+string(%d) "[%d-%s-%d %d:%d:%d] NOTICE: ready to handle connections |
| 206 |
+" |
| 207 |
+Done |
| 208 |
+--CLEAN-- |
| 209 |
+<?php |
| 210 |
+ $logfile = dirname(__FILE__).'/php-fpm.log.tmp'; |
| 211 |
+ @unlink($logfile); |
| 212 |
+?> |
| 213 |
-- |
| 214 |
1.9.3 |
| 215 |
|
| 216 |
|
| 217 |
From 6057125f4383c661b0c1af71a9e2b026f6ebecf6 Mon Sep 17 00:00:00 2001 |
| 218 |
From: Robin Gloster <robin@loc-com.de> |
| 219 |
Date: Mon, 24 Mar 2014 00:15:13 +0100 |
| 220 |
Subject: [PATCH 2/3] check for addr==null and add ipv6 to conf |
| 221 |
|
| 222 |
--- |
| 223 |
sapi/fpm/fpm/fpm_sockets.c | 11 ++++++----- |
| 224 |
sapi/fpm/php-fpm.conf.in | 48 ++++++++++++++++++++++++---------------------- |
| 225 |
2 files changed, 31 insertions(+), 28 deletions(-) |
| 226 |
|
| 227 |
diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c |
| 228 |
index 583b1fa..da14d63 100644 |
| 229 |
--- a/sapi/fpm/fpm/fpm_sockets.c |
| 230 |
+++ b/sapi/fpm/fpm/fpm_sockets.c |
| 231 |
@@ -90,7 +90,6 @@ static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int typ |
| 232 |
if (key == NULL) { |
| 233 |
switch (type) { |
| 234 |
case FPM_AF_INET : { |
| 235 |
- struct sockaddr_in *sa_in = (struct sockaddr_in *) sa; |
| 236 |
key = alloca(INET6_ADDRSTRLEN); |
| 237 |
inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key); |
| 238 |
break; |
| 239 |
@@ -265,10 +264,12 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* |
| 240 |
} |
| 241 |
|
| 242 |
// strip brackets from address for getaddrinfo |
| 243 |
- addr_len = strlen(addr); |
| 244 |
- if (addr[0] == '[' && addr[addr_len - 1] == ']') { |
| 245 |
- addr[addr_len - 1] = '\0'; |
| 246 |
- addr++; |
| 247 |
+ if (addr != NULL) { |
| 248 |
+ addr_len = strlen(addr); |
| 249 |
+ if (addr[0] == '[' && addr[addr_len - 1] == ']') { |
| 250 |
+ addr[addr_len - 1] = '\0'; |
| 251 |
+ addr++; |
| 252 |
+ } |
| 253 |
} |
| 254 |
|
| 255 |
memset(&hints, 0, sizeof hints); |
| 256 |
diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in |
| 257 |
index ab03736..d6ff2ae 100644 |
| 258 |
--- a/sapi/fpm/php-fpm.conf.in |
| 259 |
+++ b/sapi/fpm/php-fpm.conf.in |
| 260 |
@@ -55,7 +55,7 @@ |
| 261 |
; Default Value: 0 |
| 262 |
;emergency_restart_threshold = 0 |
| 263 |
|
| 264 |
-; Interval of time used by emergency_restart_interval to determine when |
| 265 |
+; Interval of time used by emergency_restart_interval to determine when |
| 266 |
; a graceful restart will be initiated. This can be useful to work around |
| 267 |
; accidental corruptions in an accelerator's shared memory. |
| 268 |
; Available Units: s(econds), m(inutes), h(ours), or d(ays) |
| 269 |
@@ -87,11 +87,11 @@ |
| 270 |
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. |
| 271 |
; Default Value: yes |
| 272 |
;daemonize = yes |
| 273 |
- |
| 274 |
+ |
| 275 |
; Set open file descriptor rlimit for the master process. |
| 276 |
; Default Value: system defined value |
| 277 |
;rlimit_files = 1024 |
| 278 |
- |
| 279 |
+ |
| 280 |
; Set max core size rlimit for the master process. |
| 281 |
; Possible Values: 'unlimited' or an integer greater or equal to 0 |
| 282 |
; Default Value: system defined value |
| 283 |
@@ -116,7 +116,7 @@ |
| 284 |
;systemd_interval = 10 |
| 285 |
|
| 286 |
;;;;;;;;;;;;;;;;;;;; |
| 287 |
-; Pool Definitions ; |
| 288 |
+; Pool Definitions ; |
| 289 |
;;;;;;;;;;;;;;;;;;;; |
| 290 |
|
| 291 |
; Multiple pools of child processes may be started with different listening |
| 292 |
@@ -152,6 +152,8 @@ group = @php_fpm_group@ |
| 293 |
; Valid syntaxes are: |
| 294 |
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on |
| 295 |
; a specific port; |
| 296 |
+; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific ipv6 address on |
| 297 |
+; a specific port; |
| 298 |
; 'port' - to listen on a TCP socket to all addresses on a |
| 299 |
; specific port; |
| 300 |
; '/path/to/unix/socket' - to listen on a unix socket. |
| 301 |
@@ -243,7 +245,7 @@ pm.max_spare_servers = 3 |
| 302 |
; Note: Used only when pm is set to 'ondemand' |
| 303 |
; Default Value: 10s |
| 304 |
;pm.process_idle_timeout = 10s; |
| 305 |
- |
| 306 |
+ |
| 307 |
; The number of requests each child process should execute before respawning. |
| 308 |
; This can be useful to work around memory leaks in 3rd party libraries. For |
| 309 |
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. |
| 310 |
@@ -296,7 +298,7 @@ pm.max_spare_servers = 3 |
| 311 |
; |
| 312 |
; By default the status page only outputs short status. Passing 'full' in the |
| 313 |
; query string will also return status for each pool process. |
| 314 |
-; Example: |
| 315 |
+; Example: |
| 316 |
; http://www.foo.bar/status?full |
| 317 |
; http://www.foo.bar/status?json&full |
| 318 |
; http://www.foo.bar/status?html&full |
| 319 |
@@ -346,9 +348,9 @@ pm.max_spare_servers = 3 |
| 320 |
; Note: The value must start with a leading slash (/). The value can be |
| 321 |
; anything, but it may not be a good idea to use the .php extension or it |
| 322 |
; may conflict with a real PHP file. |
| 323 |
-; Default Value: not set |
| 324 |
+; Default Value: not set |
| 325 |
;pm.status_path = /status |
| 326 |
- |
| 327 |
+ |
| 328 |
; The ping URI to call the monitoring page of FPM. If this value is not set, no |
| 329 |
; URI will be recognized as a ping page. This could be used to test from outside |
| 330 |
; that FPM is alive and responding, or to |
| 331 |
@@ -409,7 +411,7 @@ pm.max_spare_servers = 3 |
| 332 |
; - .... |
| 333 |
; %p: PID of the child that serviced the request |
| 334 |
; %P: PID of the parent of the child that serviced the request |
| 335 |
-; %q: the query string |
| 336 |
+; %q: the query string |
| 337 |
; %Q: the '?' character if query string exists |
| 338 |
; %r: the request URI (without the query string, see %q and %Q) |
| 339 |
; %R: remote IP address |
| 340 |
@@ -424,50 +426,50 @@ pm.max_spare_servers = 3 |
| 341 |
; |
| 342 |
; Default: "%R - %u %t \"%m %r\" %s" |
| 343 |
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" |
| 344 |
- |
| 345 |
+ |
| 346 |
; The log file for slow requests |
| 347 |
; Default Value: not set |
| 348 |
; Note: slowlog is mandatory if request_slowlog_timeout is set |
| 349 |
;slowlog = log/$pool.log.slow |
| 350 |
- |
| 351 |
+ |
| 352 |
; The timeout for serving a single request after which a PHP backtrace will be |
| 353 |
; dumped to the 'slowlog' file. A value of '0s' means 'off'. |
| 354 |
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
| 355 |
; Default Value: 0 |
| 356 |
;request_slowlog_timeout = 0 |
| 357 |
- |
| 358 |
+ |
| 359 |
; The timeout for serving a single request after which the worker process will |
| 360 |
; be killed. This option should be used when the 'max_execution_time' ini option |
| 361 |
; does not stop script execution for some reason. A value of '0' means 'off'. |
| 362 |
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
| 363 |
; Default Value: 0 |
| 364 |
;request_terminate_timeout = 0 |
| 365 |
- |
| 366 |
+ |
| 367 |
; Set open file descriptor rlimit. |
| 368 |
; Default Value: system defined value |
| 369 |
;rlimit_files = 1024 |
| 370 |
- |
| 371 |
+ |
| 372 |
; Set max core size rlimit. |
| 373 |
; Possible Values: 'unlimited' or an integer greater or equal to 0 |
| 374 |
; Default Value: system defined value |
| 375 |
;rlimit_core = 0 |
| 376 |
- |
| 377 |
+ |
| 378 |
; Chroot to this directory at the start. This value must be defined as an |
| 379 |
; absolute path. When this value is not set, chroot is not used. |
| 380 |
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one |
| 381 |
; of its subdirectories. If the pool prefix is not set, the global prefix |
| 382 |
; will be used instead. |
| 383 |
-; Note: chrooting is a great security feature and should be used whenever |
| 384 |
+; Note: chrooting is a great security feature and should be used whenever |
| 385 |
; possible. However, all PHP paths will be relative to the chroot |
| 386 |
; (error_log, sessions.save_path, ...). |
| 387 |
; Default Value: not set |
| 388 |
-;chroot = |
| 389 |
- |
| 390 |
+;chroot = |
| 391 |
+ |
| 392 |
; Chdir to this directory at the start. |
| 393 |
; Note: relative path can be used. |
| 394 |
; Default Value: current directory or / when chroot |
| 395 |
;chdir = /var/www |
| 396 |
- |
| 397 |
+ |
| 398 |
; Redirect worker stdout and stderr into main error log. If not set, stdout and |
| 399 |
; stderr will be redirected to /dev/null according to FastCGI specs. |
| 400 |
; Note: on highloaded environement, this can cause some delay in the page |
| 401 |
@@ -491,7 +493,7 @@ pm.max_spare_servers = 3 |
| 402 |
; Note: set an empty value to allow all extensions. |
| 403 |
; Default Value: .php |
| 404 |
;security.limit_extensions = .php .php3 .php4 .php5 |
| 405 |
- |
| 406 |
+ |
| 407 |
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from |
| 408 |
; the current environment. |
| 409 |
; Default Value: clean env |
| 410 |
@@ -505,7 +507,7 @@ pm.max_spare_servers = 3 |
| 411 |
; overwrite the values previously defined in the php.ini. The directives are the |
| 412 |
; same as the PHP SAPI: |
| 413 |
; php_value/php_flag - you can set classic ini defines which can |
| 414 |
-; be overwritten from PHP call 'ini_set'. |
| 415 |
+; be overwritten from PHP call 'ini_set'. |
| 416 |
; php_admin_value/php_admin_flag - these directives won't be overwritten by |
| 417 |
; PHP call 'ini_set' |
| 418 |
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. |
| 419 |
-- |
| 420 |
1.9.3 |
| 421 |
|
| 422 |
|
| 423 |
From 12c3e728c634f17232883068c14f36a68b78952a Mon Sep 17 00:00:00 2001 |
| 424 |
From: Robin Gloster <robin@loc-com.de> |
| 425 |
Date: Thu, 3 Apr 2014 13:22:31 +0200 |
| 426 |
Subject: [PATCH 3/3] revert whitespace |
| 427 |
|
| 428 |
--- |
| 429 |
sapi/fpm/php-fpm.conf.in | 48 ++++++++++++++++++++++++------------------------ |
| 430 |
1 file changed, 24 insertions(+), 24 deletions(-) |
| 431 |
|
| 432 |
diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in |
| 433 |
index d6ff2ae..8e242aa 100644 |
| 434 |
--- a/sapi/fpm/php-fpm.conf.in |
| 435 |
+++ b/sapi/fpm/php-fpm.conf.in |
| 436 |
@@ -55,7 +55,7 @@ |
| 437 |
; Default Value: 0 |
| 438 |
;emergency_restart_threshold = 0 |
| 439 |
|
| 440 |
-; Interval of time used by emergency_restart_interval to determine when |
| 441 |
+; Interval of time used by emergency_restart_interval to determine when |
| 442 |
; a graceful restart will be initiated. This can be useful to work around |
| 443 |
; accidental corruptions in an accelerator's shared memory. |
| 444 |
; Available Units: s(econds), m(inutes), h(ours), or d(ays) |
| 445 |
@@ -87,11 +87,11 @@ |
| 446 |
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. |
| 447 |
; Default Value: yes |
| 448 |
;daemonize = yes |
| 449 |
- |
| 450 |
+ |
| 451 |
; Set open file descriptor rlimit for the master process. |
| 452 |
; Default Value: system defined value |
| 453 |
;rlimit_files = 1024 |
| 454 |
- |
| 455 |
+ |
| 456 |
; Set max core size rlimit for the master process. |
| 457 |
; Possible Values: 'unlimited' or an integer greater or equal to 0 |
| 458 |
; Default Value: system defined value |
| 459 |
@@ -116,7 +116,7 @@ |
| 460 |
;systemd_interval = 10 |
| 461 |
|
| 462 |
;;;;;;;;;;;;;;;;;;;; |
| 463 |
-; Pool Definitions ; |
| 464 |
+; Pool Definitions ; |
| 465 |
;;;;;;;;;;;;;;;;;;;; |
| 466 |
|
| 467 |
; Multiple pools of child processes may be started with different listening |
| 468 |
@@ -152,7 +152,7 @@ group = @php_fpm_group@ |
| 469 |
; Valid syntaxes are: |
| 470 |
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on |
| 471 |
; a specific port; |
| 472 |
-; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific ipv6 address on |
| 473 |
+; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on |
| 474 |
; a specific port; |
| 475 |
; 'port' - to listen on a TCP socket to all addresses on a |
| 476 |
; specific port; |
| 477 |
@@ -245,7 +245,7 @@ pm.max_spare_servers = 3 |
| 478 |
; Note: Used only when pm is set to 'ondemand' |
| 479 |
; Default Value: 10s |
| 480 |
;pm.process_idle_timeout = 10s; |
| 481 |
- |
| 482 |
+ |
| 483 |
; The number of requests each child process should execute before respawning. |
| 484 |
; This can be useful to work around memory leaks in 3rd party libraries. For |
| 485 |
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. |
| 486 |
@@ -298,7 +298,7 @@ pm.max_spare_servers = 3 |
| 487 |
; |
| 488 |
; By default the status page only outputs short status. Passing 'full' in the |
| 489 |
; query string will also return status for each pool process. |
| 490 |
-; Example: |
| 491 |
+; Example: |
| 492 |
; http://www.foo.bar/status?full |
| 493 |
; http://www.foo.bar/status?json&full |
| 494 |
; http://www.foo.bar/status?html&full |
| 495 |
@@ -348,9 +348,9 @@ pm.max_spare_servers = 3 |
| 496 |
; Note: The value must start with a leading slash (/). The value can be |
| 497 |
; anything, but it may not be a good idea to use the .php extension or it |
| 498 |
; may conflict with a real PHP file. |
| 499 |
-; Default Value: not set |
| 500 |
+; Default Value: not set |
| 501 |
;pm.status_path = /status |
| 502 |
- |
| 503 |
+ |
| 504 |
; The ping URI to call the monitoring page of FPM. If this value is not set, no |
| 505 |
; URI will be recognized as a ping page. This could be used to test from outside |
| 506 |
; that FPM is alive and responding, or to |
| 507 |
@@ -411,7 +411,7 @@ pm.max_spare_servers = 3 |
| 508 |
; - .... |
| 509 |
; %p: PID of the child that serviced the request |
| 510 |
; %P: PID of the parent of the child that serviced the request |
| 511 |
-; %q: the query string |
| 512 |
+; %q: the query string |
| 513 |
; %Q: the '?' character if query string exists |
| 514 |
; %r: the request URI (without the query string, see %q and %Q) |
| 515 |
; %R: remote IP address |
| 516 |
@@ -426,50 +426,50 @@ pm.max_spare_servers = 3 |
| 517 |
; |
| 518 |
; Default: "%R - %u %t \"%m %r\" %s" |
| 519 |
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" |
| 520 |
- |
| 521 |
+ |
| 522 |
; The log file for slow requests |
| 523 |
; Default Value: not set |
| 524 |
; Note: slowlog is mandatory if request_slowlog_timeout is set |
| 525 |
;slowlog = log/$pool.log.slow |
| 526 |
- |
| 527 |
+ |
| 528 |
; The timeout for serving a single request after which a PHP backtrace will be |
| 529 |
; dumped to the 'slowlog' file. A value of '0s' means 'off'. |
| 530 |
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
| 531 |
; Default Value: 0 |
| 532 |
;request_slowlog_timeout = 0 |
| 533 |
- |
| 534 |
+ |
| 535 |
; The timeout for serving a single request after which the worker process will |
| 536 |
; be killed. This option should be used when the 'max_execution_time' ini option |
| 537 |
; does not stop script execution for some reason. A value of '0' means 'off'. |
| 538 |
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) |
| 539 |
; Default Value: 0 |
| 540 |
;request_terminate_timeout = 0 |
| 541 |
- |
| 542 |
+ |
| 543 |
; Set open file descriptor rlimit. |
| 544 |
; Default Value: system defined value |
| 545 |
;rlimit_files = 1024 |
| 546 |
- |
| 547 |
+ |
| 548 |
; Set max core size rlimit. |
| 549 |
; Possible Values: 'unlimited' or an integer greater or equal to 0 |
| 550 |
; Default Value: system defined value |
| 551 |
;rlimit_core = 0 |
| 552 |
- |
| 553 |
+ |
| 554 |
; Chroot to this directory at the start. This value must be defined as an |
| 555 |
; absolute path. When this value is not set, chroot is not used. |
| 556 |
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one |
| 557 |
; of its subdirectories. If the pool prefix is not set, the global prefix |
| 558 |
; will be used instead. |
| 559 |
-; Note: chrooting is a great security feature and should be used whenever |
| 560 |
+; Note: chrooting is a great security feature and should be used whenever |
| 561 |
; possible. However, all PHP paths will be relative to the chroot |
| 562 |
; (error_log, sessions.save_path, ...). |
| 563 |
; Default Value: not set |
| 564 |
-;chroot = |
| 565 |
- |
| 566 |
+;chroot = |
| 567 |
+ |
| 568 |
; Chdir to this directory at the start. |
| 569 |
; Note: relative path can be used. |
| 570 |
; Default Value: current directory or / when chroot |
| 571 |
;chdir = /var/www |
| 572 |
- |
| 573 |
+ |
| 574 |
; Redirect worker stdout and stderr into main error log. If not set, stdout and |
| 575 |
; stderr will be redirected to /dev/null according to FastCGI specs. |
| 576 |
; Note: on highloaded environement, this can cause some delay in the page |
| 577 |
@@ -493,7 +493,7 @@ pm.max_spare_servers = 3 |
| 578 |
; Note: set an empty value to allow all extensions. |
| 579 |
; Default Value: .php |
| 580 |
;security.limit_extensions = .php .php3 .php4 .php5 |
| 581 |
- |
| 582 |
+ |
| 583 |
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from |
| 584 |
; the current environment. |
| 585 |
; Default Value: clean env |
| 586 |
@@ -507,7 +507,7 @@ pm.max_spare_servers = 3 |
| 587 |
; overwrite the values previously defined in the php.ini. The directives are the |
| 588 |
; same as the PHP SAPI: |
| 589 |
; php_value/php_flag - you can set classic ini defines which can |
| 590 |
-; be overwritten from PHP call 'ini_set'. |
| 591 |
+; be overwritten from PHP call 'ini_set'. |
| 592 |
; php_admin_value/php_admin_flag - these directives won't be overwritten by |
| 593 |
; PHP call 'ini_set' |
| 594 |
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. |
| 595 |
-- |
| 596 |
1.9.3 |
| 597 |
|