forked from perusio/drupal-with-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upstream_phpapache.conf
36 lines (30 loc) · 1.26 KB
/
upstream_phpapache.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
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
### Upstream configuration for Apache functioning has a PHP handler.
## 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.
upstream phpapache {
## Use the least connection algorithm for load balancing. This
## algorithm was introduced in versions 1.3.1 and 1.2.2.
least_conn;
server 127.0.0.1:8080;
server 127.0.0.1:8081;
## 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 phpapache_backup {
server 127.0.0.1:8082;
## 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;
}