脚本宝典收集整理的这篇文章主要介绍了nginx负载均衡配置,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
#负载均衡配置
upstream testDomain { server 127.0.0.1:8080 weight=1; server 127.0.0.1:8081 weight=3; }
server { listen 80; server_name test123.com;
#匹配的请求路径
location / { root html; index index.html index.htm;
#代理指向 proxy_pass http://testDomain; }
}
常用命令
启动
直接点击Nginx目录下的nginx.exe 或者 cmd运行start nginx
nginx -s stop | fast shutdown |
nginx -s quit | graceful shutdown |
nginx -s reload | changing configuration,starting new worker processes with a new configuration,graceful shutdown of old worker processes |
nginx -s reopen | re-opening log files |
以上是脚本宝典为你收集整理的nginx负载均衡配置全部内容,希望文章能够帮你解决nginx负载均衡配置所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。