forked from perusio/drupal-with-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
php_fpm_status_vhost.conf
79 lines (69 loc) · 2.41 KB
/
php_fpm_status_vhost.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
### The configuration for the status pages of php-fpm. As described in
### http://www.php.net/manual/en/install.fpm.configuration.php.
### php-fpm provides a status and a heartbeat page that is served through the web server.
### Here's an example configuration for them.
## The status page is at /fpm-status. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass www0;
access_log off;
}
## The ping page is at /ping and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass www0;
access_log off;
}
## This is for the second pool. It assumes that you've configured
## php-fpm to have two pools and the URIs configured for the status
## and ping pages are as specified below. Zwei is 2 in german.
## The status page is at /fpm-status. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status-zwei {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass www1;
access_log off;
}
## The ping page is at /ping and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping-zwei {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass www1;
access_log off;
}
## This is for the third pool that acts as backup. It assumes that
## you've configured php-fpm to have two pools and the URIs configured
## for the status and ping pages are as specified below. Drei is 3 in
## german.
## The status page is at /fpm-status. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status-drei {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass phpcgi;
access_log off;
}
## The ping page is at /ping and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping-drei {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass phpcgi;
access_log off;
}