Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 从标头设置proxypass域_Apache_Nginx_Mod Proxy_Proxypass_Hostheaders - Fatal编程技术网

Apache 从标头设置proxypass域

Apache 从标头设置proxypass域,apache,nginx,mod-proxy,proxypass,hostheaders,Apache,Nginx,Mod Proxy,Proxypass,Hostheaders,试图找到一种基于传入标头实现proxypass的方法 例如: proxyPass / https://%{{x-backend-host}}/ 其中X-backend-host将位于请求头中 这背后的想法是拥有多个传入域,即one.example.com、two.example.com、three.example.com,并让它们指向自己独特的后端 有没有人有任何想法或参考资料可以让我来实现这样的场景。您需要通过mod_rewrite的重写规则来实现这一点。从ProxyPass的 If yo

试图找到一种基于传入标头实现proxypass的方法

例如:

proxyPass / https://%{{x-backend-host}}/
其中X-backend-host将位于请求头中

这背后的想法是拥有多个传入域,即one.example.com、two.example.com、three.example.com,并让它们指向自己独特的后端


有没有人有任何想法或参考资料可以让我来实现这样的场景。

您需要通过mod_rewrite的重写规则来实现这一点。从ProxyPass的

 If you require a more flexible reverse-proxy configuration, see the RewriteRule directive with the [P] flag.
阅读并了解改写规则:
(向下滚动描述不同标志的位置并查找[P]标志)

有人有什么想法吗?