0
点赞
收藏
分享

微信扫一扫

基于反向代理的负载均衡器

认真的老去 2022-04-05 阅读 42
nginx


worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;


    keepalive_timeout  65;

      upstream httpds{
          server 192.168.159.102;
          server 192.168.159.103;
      }

    server {
        listen       80;
        server_name  localhost;
        location / {
            proxy_pass http://httpds;
        }

     
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }
}
 

举报

相关推荐

0 条评论