nginx配置

系统运维 waitig 501℃ 百度已收录 0评论
    //服务器1
    upstream my_server {
           server localhost:8080;
           keepalive 2000;
     }

    //服务器2
   upstream my_server1 {
        server localhost:8081;
        keepalive 2000;
    }


    //nginx 服务器80端口
    server {
        listen       80;
        server_name  39.108.4.204;
        //转发到my_server1
        location /{
                proxy_pass http://my_server1;
                proxy_set_header Host $host:$server_port;
         }
         //转发到my_server/my
        location /my/{
                proxy_pass http://my_server;
                proxy_set_header Host $host:$server_port;
         }

本文由【waitig】发表在等英博客
本文固定链接:nginx配置
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)