ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

nginx反向代理

nginx反向代理

负载均衡

upstream zhaoqiang{server 127.0.0.1:8080 weight=1;server 127.0.0.1:8081;
}
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://zhaoqiang; #反向代理}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}
返回列表