Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: D7
@perusio
49 lines (40 sloc) 1.711 kB
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
### Upstream configuration for PHP FastCGI.
## Add as many servers as needed:
## Cf. http://wiki.nginx.org/HttpUpstreamModule.
## Note that this configuration assumes by default that keepalive
## upstream connections are supported and that you have a Nginx
## version with the fair load balancer.
## Add as many servers as needed. Cf. http://wiki.nginx.org/HttpUpstreamModule.
upstream phpcgi {
## Use the least connection algorithm for load balancing. This
## 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;
## 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
## line if that's not the case.
keepalive 5;
}
## Add a third pool as a fallback. Note that this requires php-cgi
## 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;
## 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 line if that's not the case.
keepalive 1;
}
## The upstreams below are used only for monitoring php-fpm status,
## The PHP TCP upstream that corresponds to the first pool: www0.
upstream www0 {
server unix:/var/run/php-fpm.sock;
}
## The PHP TCP upstream that corresponds to the second pool: www1.
upstream www1 {
server unix:/var/run/php-fpm-zwei.sock;
}
Jump to Line
Something went wrong with that request. Please try again.