【发布时间】:2014-04-30 05:32:24
【问题描述】:
我想将 apache2 中的代理从子域传递到像这样的其他端口
http://test1.example.com -> http://test1.example.com:6543
无论如何要编写配置文件,但不是针对此子域,而是针对所有子域
无论如何,例如 http://.*.example.com -> http://.*.example.com:6543
和 http://.*.example.com/first/second -> http://.*.example.com:6543/first/second
这是我的配置
<VirtualHost *:80> ServerName example.com ProxyPassMatch ^([^.]+)\.example\.com(.*) http://$1.example.com:6543/$2 ProxyPassReverse / http://example.com </VirtualHost>
【问题讨论】:
标签: regex apache mod-proxy proxypass