Apache或Varnish反向代理到子文件夹

我有一个域,site.example.com,我想在site2.example.com/subfolder中反向代理一个web应用程序。 用户应该使用site.example.com/sub文件夹来访问该应用程序。 可能吗? 我想使用Apache或甚至更好的清漆(没有击中Apache)做redirect。

谢谢

我会使用Apache,除非你有一个高stream量网站。 这可以通过使用带有ProxyPass和ProxyPassReverse的 mod_proxy来完成。

它将最终成为像在site.example.com服务器上的东西:

ProxyRequests On ProxyVia On ProxyPass /subfolder http://site2.example.com/subfolder ProxyPassReverse /subfolder http://site2.example.com/subfolder