Ngix极简配置

安装完Ngix后,在conf目录下找到ngix.conf文件,修改里面的内容
http模块处增加:

upstream tomcatserver1 {  
    server 127.0.0.1:8001 weight=3;  
    server 127.0.0.1:8002;  
}
server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        root   html;
        index  index.html index.htm;
        proxy_pass   http://tomcatserver1;
    }

你可能感兴趣的:(Ngix极简配置)