| 
       采用consistent方式进行url_hash负载均衡。 
	重新编译nginx: 
	复制代码代码如下: 
	wget http://download.github.com/replay-ngx_http_consistent_hash-77b6940.tar.gz 
tar zxvf replay-ngx_http_consistent_hash-77b6940.tar.gz cd nginx-0.7.65 ./configure --prefix=/home/nginx --with-pcre=/tmp/pcre-8.01 --with-http_stub_status_module --with-http_ssl_module --without-http_rewrite_module --add-module=/tmp/nginx_upstream_hash-0.3 --add-module=/tmp/replay-ngx_http_consistent_hash-77b6940 make && make install 
	修改配置文件: 
	复制代码代码如下: 
	upstream images6.static.com { 
server 11.11.11.12:80; server 11.11.11.13:80; consistent_hash $request_uri; } 访问测试正常。 
	error_page配置备份: 
	复制代码代码如下: 
		upstream backup { 
		error_page 404 500 502 503 504 =200 @fetch; (责任编辑:IT)  | 
    
