如何使用 Apache HTTPD 在同一台服务器上设置正向代理和反向代理
我有一个既充当 HTTP 服务器又充当 HTTP 客户端的应用程序。出于安全原因,应用程序在受保护/内部网络的服务器上运行。我想设置一个 HTTP 代理,充当外部各方访问应用程序的外部接口。
对于外部 HTTP 客户端访问我的应用程序,我希望有一个反向代理来处理这种情况。
对于从我的应用程序到外部各方的 HTTP 请求,我希望有一个转发代理来确保将正确的外部 URL 发送到外部各方。
问题:Apache HTTPD 代理可以配置为同时运行正向代理和反向代理吗?
I have an application that acts as both a HTTP server as well as a HTTP client. For security reasons, the application runs on a server on a protected/internal network. I would like to setup a HTTP proxy that acts as an external interface for external parties to access the application.
For external HTTP clients to access my application, I would like to have a reverse proxy to handle such scenarios.
For HTTP request from my application to external parties, I would like to have a forward proxy to ensure my proper external URL's are sent to the external parties.
Question: Can Apache HTTPD proxy be configured to run a both a forward proxy and reverse proxy at the same time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的答案(根据我对文档的阅读)是否定的。
正向代理是使用 ProxyRequests 指令激活的
。反向代理是使用 ProxyPass 指令激活的。
反向代理文档状态
我认为如果您在同一台服务器上启用两者,则 IP 等的允许、拒绝设置可能会发生冲突
The short answer (from my reading of the docs) is No.
The forward proxy is activated using the
ProxyRequests
directiveA reverse proxy is activated using the
ProxyPass
directive.The reverse proxy docs state
I think if you enable both on the same server, there will be a possible clash in your Allow, Deny settings for IPs etc