nginx conf配置文件

upstream tomcatserver2 {

        //下面这个配置可以将请求绑定到每个服务器,粘性ip
        ip_hash;
        server 192.168.0.174:8001 weight=5;
        server 192.168.0.174:8002 weight=5;
    }

   server {
        listen       80;
        server_name  localhost;
 
        #charset koi8-r;
 
        #access_log  logs/host.access.log  main;
 
        location / {
            proxy_pass   http://tomcatserver2;
            index  index.html index.htm;
        }  
    }

猜你喜欢

转载自blog.csdn.net/zn65786412qq/article/details/81083326