nginx负载均衡简单配置



nginx负载均衡简单配置
 
在http中配置   www.2cto.com  
Java代码  
upstream test{  
                server 127.0.0.1:8082;  
                server 127.0.0.1:8081;  
        }  
 
并引入
Java代码  
include /etc/nginx/vhosts_conf/*.conf;  
  www.2cto.com  
在vhosts_conf下的conf文件中
 
Java代码  
server {  
                listen 808;  
                server_name www.test.com;  
                index index.jsp index.html index.htm;  
                root /home/www/test.com;  
                location / {  
                        proxy_pass http://test;  
                }  
        }  

相关内容

    暂无相关文章