[英]Nginx redirect all POST traffic to another server
I am in the middle of setting up a 3 node web server cluster running Nginx , Apache 2 and MySQL. 我正在设置一个运行Nginx,Apache 2和MySQL的3节点Web服务器集群。
The question is this. 问题是这样的。 In my rewrite rules on web server 2 - 3 I want to direct all POST traffic to Web Server 1 ( on the private network if possible).
在Web服务器2-3上的重写规则中,我想将所有POST流量都定向到Web服务器1(如果可能,请在专用网络上)。 All servers are behind a load balancer.
所有服务器都位于负载平衡器之后。
So what would I need to put in the conf file for the vhost to redirect all traffic to Web server 1? 那么,我需要在conf文件中添加什么信息才能使vhost将所有流量重定向到Web服务器1?
Thanks 谢谢
if ($request_method = POST) {
proxy_pass http://server1;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.