Skip to content

Commit

Permalink
Rename poll, status and ping
Browse files Browse the repository at this point in the history
  • Loading branch information
iryston committed Aug 1, 2016
1 parent b9ea81f commit 8779bb3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
24 changes: 12 additions & 12 deletions php_fpm_status_vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
### 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
## The status page is at /fpm-status-www0. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status {
location = /fpm-status-www0 {
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.
## The ping page is at /ping-www0 and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping {
location = /ping-www0 {
if ($dont_show_fpm_status) {
return 404;
}
Expand All @@ -31,20 +31,20 @@ location = /ping {
## 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
## The status page is at /fpm-status-www1. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status-zwei {
location = /fpm-status-www1 {
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.
## The ping page is at /ping-www1 and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping-zwei {
location = /ping-www1 {
if ($dont_show_fpm_status) {
return 404;
}
Expand All @@ -57,20 +57,20 @@ location = /ping-zwei {
## 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
## The status page is at /fpm-status-www2. Only local access is
## allowed. Non authorized access returns a 404 through the error_page
## directive.
location = /fpm-status-drei {
location = /fpm-status-www2 {
if ($dont_show_fpm_status) {
return 404;
}
fastcgi_pass www2;
access_log off;
}

## The ping page is at /ping and returns the string configured at the php-fpm level.
## The ping page is at /ping-www2 and returns the string configured at the php-fpm level.
## Also only local network connections (loopback and LAN) are permitted.
location = /ping-drei {
location = /ping-www2 {
if ($dont_show_fpm_status) {
return 404;
}
Expand Down
5 changes: 5 additions & 0 deletions upstream_phpcgi_tcp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ upstream www0 {
upstream www1 {
server 127.0.0.1:9002;
}

## The PHP TCP upstream that corresponds to the third pool: www2.
upstream www2 {
server 127.0.0.1:9003;
}
12 changes: 6 additions & 6 deletions upstream_phpcgi_unix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ upstream phpcgi {
## algorithm was introduced in versions 1.3.1 and 1.2.2.
least_conn;

server unix:/var/run/php-fpm.sock;
server unix:/var/run/php-fpm-zwei.sock;
server unix:/var/run/php-fpm-www0.sock;
server unix:/var/run/php-fpm-www1.sock;
## Create a backend connection cache. Note that this requires
## Nginx version greater or equal to 1.1.4.
## Cf. http://nginx.org/en/CHANGES. Comment out the following
Expand All @@ -27,7 +27,7 @@ upstream phpcgi {
## side by side php-fpm. If you don't have it installed comment it
## out.
upstream phpcgi_backup {
server unix:/var/run/php-fpm-bkp.sock;
server unix:/var/run/php-fpm-www2.sock;
## Create a backend connection cache. Note that this requires
## Nginx version greater or equal to 1.1.4.
## Cf. http://nginx.org/en/CHANGES. Comment out the
Expand All @@ -39,15 +39,15 @@ upstream phpcgi_backup {

## The PHP TCP upstream that corresponds to the first pool: www0.
upstream www0 {
server unix:/var/run/php-fpm.sock;
server unix:/var/run/php-fpm-www0.sock;
}

## The PHP TCP upstream that corresponds to the second pool: www1.
upstream www1 {
server unix:/var/run/php-fpm-zwei.sock;
server unix:/var/run/php-fpm-www1.sock;
}

## The PHP TCP upstream that corresponds to the third pool: www2.
upstream www2 {
server unix:/var/run/php-fpm-drei.sock;
server unix:/var/run/php-fpm-www2.sock;
}

0 comments on commit 8779bb3

Please sign in to comment.