简体   繁体   中英

Can Apache be setup as forward proxy and reverse proxy at the same time?

I want to achieve the following:

My app services user requests like so: user request www.mysite.com -> Apache reverse proxy -> 192.168.1.1:8080/myApp

My app also makes requests but I want to route through a proxy: 192.168.1.1:8080/myApp -> Apache forward proxy -> www.google.com

Can I set this up on the same Apache server? If not, can I do it with two Apache servers on the same system?

我的解决方案是在 apache 中设置两个具有不同端口的虚拟主机,一个充当反向代理,另一个充当正向代理。

一个 conf 文件包含ProxyRequest on它使 Apache 作为 Forward-proxy 工作并将 ProxyRemote 放到localhost:high-port ,另一个 conf 文件包含每个端口的 VHOST 块, ProxyRequest off ,这使 Apache 作为Reverse-proxy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM