Commit 64b2ff61 by zhangxingmin

push

parent 30317d29
......@@ -2,10 +2,6 @@
upstream gateway_load_balance {
server 192.168.7.4:9010; # 管理节点服务器上的网关实例
server 192.168.7.5:9011; # 工作节点服务器上的网关实例
# 添加负载均衡策略
# least_conn; # 最少连接数
# ip_hash; # IP哈希(需要会话保持时)
}
server {
......@@ -29,9 +25,6 @@ server {
# 负载均衡到两个网关服务实例
proxy_pass http://gateway_load_balance;
# 注意:这里不要以斜杠结尾,保留原始路径 /api/xxx
# 如果网关需要去掉 /api 前缀,可以使用:proxy_pass http://gateway_load_balance/;
# 代理设置
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
......@@ -71,9 +64,4 @@ server {
return 200 "healthy\n";
add_header Content-Type text/plain;
}
# 全局方法限制(可选,也可以在每个location中单独设置)
limit_except GET POST PUT DELETE OPTIONS {
deny all;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment