访问ip控制
location /test/ {
allow 192.168.1.1;
deny all;
}
负载均衡
nginx.conf
http {
upstream A {
server 192.168.1.1:5000;
server 192.168.1.2:5000;
}
}
sites/a.conf
server {
location / {
proxy_pass A;
}
}
其他
centos service cmds
检查配置文件正确性
service nginx configtest
重新加载配置
service nginx reload








