#負載均衡配置
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 |
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/400500.html
標籤:其他
上一篇:計算機網路期末考試大題(一)
下一篇:計算機網路期末復習易錯題(四)
