译序:截至发稿时止,官方最新 ngx_http_upstream_module 指令详述。官方随时在更新,请及时关注官网最新公布。以下是官方原文。
ngx_http_upstream_module 模块用于定义可以被 proxy_pass、fastcgi_pass 以及memcached_pass 等指令引用的服务器群。
配置示例
upstream backend {
server backend1.example.com weight=5;
server backend2.example.com:8080;
server unix:/tmp/backend3;
server backup1.example.com:8080 backup;
server backup2.example.com:8080 backup;
}
server {
location / {
proxy_pass http://backend;
}
}
动态可配置群,仅作为我们商业订阅的一部分:
upstream appservers {
zone appservers 64k;
server appserv1.example.com weight=5;
server appserv2.example.com:8080 fail_timeout=5s slow_start=30s;
server 192.0.2.1 max_fails=3;
server reserve1.example.com:8080 backup;
server reserve2.example.com:8080 backup;
}
server {
location / {
proxy_pass http://appservers;
health_check;
}
location /upstream_conf {
upstream_conf;
allow 127.0.0.1;
deny all;
}
}
更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2013-10/91907p2.htm
推荐阅读:
CentOS 6.2实战部署Nginx+MySQL+PHP http://www.linuxidc.com/Linux/2013-09/90020.htm
使用Nginx搭建WEB服务器 http://www.linuxidc.com/Linux/2013-09/89768.htm
搭建基于Linux6.3+Nginx1.2+PHP5+MySQL5.5的Web服务器全过程 http://www.linuxidc.com/Linux/2013-09/89692.htm
CentOS 6.3下Nginx性能调优 http://www.linuxidc.com/Linux/2013-09/89656.htm
CentOS 6.3下配置Nginx加载ngx_pagespeed模块 http://www.linuxidc.com/Linux/2013-09/89657.htm
CentOS 6.4安装配置Nginx+Pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx 的详细介绍:请点这里
Nginx 的下载地址:请点这里
