-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathupstream_phpcgi_unix.conf
37 lines (32 loc) · 1.28 KB
/
upstream_phpcgi_unix.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
### Upstream configuration for PHP FastCGI (PHP-FPM).
### ***IMPORTANT NOTE:***
### This configuration uses three pools for PHP5-FPM
### named www1, www2 and www3. It is not necessary
### that you use this configuration for PHP5-FPM
### but you **must** make sure that the configuration
### here matches your PHP5-FPM, either by changing
### this configuration or your PHP5-FPM configuration.
###_ IMPLEMENT
###_ Mandatory: 1. Review and change as necessary.
## 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 {
## If your version of Nginx doesn't have the fair load balancer:
## https://github.com/gnosek/nginx-upstream-fair comment out the
## following line.
fair;
server unix:/var/run/php5-fpm-www1.sock;
server unix:/var/run/php5-fpm-www2.sock;
## Create a backend connection cache.
keepalive 5;
}
## Add a third pool as a fallback.
upstream phpcgi_backup {
server unix:/var/run/php5-fpm-www3.sock;
## Create a backend connection cache.
keepalive 1;
}