File tree 3 files changed +24
-15
lines changed
3 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 9
9
## version with the fair load balancer.
10
10
11
11
upstream phpapache {
12
- ## If your version of Nginx doesn't have the fair load balancer:
13
- ## https://github.com/gnosek/nginx-upstream-fair comment out the
14
- ## following line.
15
- fair;
12
+ ## Use the least connection algorithm for load balancing. This
13
+ ## algorithm was introduced in versions 1.3.1 and 1.2.2.
14
+ least_conn;
15
+
16
16
server 127.0.0.1:8080;
17
17
server 127.0.0.1:8081;
18
18
## Create a backend connection cache. Note that this requires
@@ -22,7 +22,9 @@ upstream phpapache {
22
22
keepalive 5;
23
23
}
24
24
25
- ## Add a third pool as a fallback.
25
+ ## Add a third pool as a fallback. Note that this requires php-cgi
26
+ ## side by side php-fpm. If you don't have it installed comment it
27
+ ## out.
26
28
upstream phpapache_backup {
27
29
server 127.0.0.1:8082;
28
30
## Create a backend connection cache. Note that this requires
@@ -31,3 +33,4 @@ upstream phpapache_backup {
31
33
## following line if that's not the case.
32
34
keepalive 1;
33
35
}
36
+
Original file line number Diff line number Diff line change 10
10
11
11
## Add as many servers as needed. Cf. http://wiki.nginx.org/HttpUpstreamModule.
12
12
upstream phpcgi {
13
- ## If your version of Nginx doesn't have the fair load balancer:
14
- ## https://github.com/gnosek/nginx-upstream-fair comment out the
15
- ## following line.
16
- fair;
13
+ ## Use the least connection algorithm for load balancing. This
14
+ ## algorithm was introduced in versions 1.3.1 and 1.2.2.
15
+ least_conn;
16
+
17
17
server 127.0.0.1:9001;
18
18
server 127.0.0.1:9002;
19
19
## Create a backend connection cache. Note that this requires
@@ -23,7 +23,9 @@ upstream phpcgi {
23
23
keepalive 5;
24
24
}
25
25
26
- ## Add a third pool as a fallback.
26
+ ## Add a third pool as a fallback. Note that this requires php-cgi
27
+ ## side by side php-fpm. If you don't have it installed comment it
28
+ ## out.
27
29
upstream phpcgi_backup {
28
30
server 127.0.0.1:9003;
29
31
## Create a backend connection cache. Note that this requires
@@ -32,3 +34,4 @@ upstream phpcgi_backup {
32
34
## following line if that's not the case.
33
35
keepalive 1;
34
36
}
37
+
Original file line number Diff line number Diff line change 10
10
11
11
## Add as many servers as needed. Cf. http://wiki.nginx.org/HttpUpstreamModule.
12
12
upstream phpcgi {
13
- ## If your version of Nginx doesn't have the fair load balancer:
14
- ## https://github.com/gnosek/nginx-upstream-fair comment out the
15
- ## following line.
16
- fair;
13
+ ## Use the least connection algorithm for load balancing. This
14
+ ## algorithm was introduced in versions 1.3.1 and 1.2.2.
15
+ least_conn;
16
+
17
17
server unix:/var/run/php-fpm.sock;
18
18
server unix:/var/run/php-fpm-zwei.sock;
19
19
## Create a backend connection cache. Note that this requires
@@ -23,7 +23,9 @@ upstream phpcgi {
23
23
keepalive 5;
24
24
}
25
25
26
- ## Add a third pool as a fallback.
26
+ ## Add a third pool as a fallback. Note that this requires php-cgi
27
+ ## side by side php-fpm. If you don't have it installed comment it
28
+ ## out.e
27
29
upstream phpcgi_backup {
28
30
server unix:/var/run/php-fpm-bkp.sock;
29
31
## Create a backend connection cache. Note that this requires
@@ -32,3 +34,4 @@ upstream phpcgi_backup {
32
34
## following line if that's not the case.
33
35
keepalive 1;
34
36
}
37
+
You can’t perform that action at this time.
0 commit comments