[英]How to reverse proxy a host with apache that is behind a forward proxy
If you have a host that is only reachable through a forward proxy and wish to access it through an application, that does not support proxies - how do you set up an reverse proxy in a virtual host of an apache, which is reachable by the application? 如果您拥有只能通过正向代理访问的主机,并且希望通过应用程序访问它,则该主机不支持代理-您如何在apache的虚拟主机中设置反向代理,应用程序可以访问它?
That is, the application accesses http://myapache:myvirtualhost/ , from which myapache accesses the remote application by forwardproxy:forwardport . 也就是说,应用程序访问http:// myapache:myvirtualhost / ,myapache通过forwardproxy:forwardport从中访问远程应用程序。
One way to do this is to set up the apache on myapache with: 一种方法是使用以下命令在myapache上设置apache:
Listen 12345
<VirtualHost *:12345>
ProxyRemote http http://forwardproxy:5432
<Location />
ProxyPass http://remoteapp:9876/
ProxyPassReverse /
</Location>
</VirtualHost>
The remote application http://remoteapp:9876/ is reverse-proxied as http://myapache:12345 . 远程应用程序http:// remoteapp:9876 /被反向代理为http:// myapache:12345 。 If something connects http://myapache:12345 , the request is proxied by http://forwardproxy:5432
如果某事连接了http:// myapache:12345 ,则请求由http:// forwardproxy:5432代理
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.