使用 Apache mod_proxy 的风险
我现在正在探索使用 Apache 的 mod_proxy 指令,例如 ProxyPass,作为跨域脚本限制解决方案的一部分(对于 html/ajax/flash 代码)。 但是,我担心启用 mod_proxy 可能会冒使服务器成为开放代理的风险。
简而言之,有什么风险,以及如何最大限度地降低风险?
谢谢。
I am now exploring to use Apache's mod_proxy's directive, eg ProxyPass, as part of solution for cross-domain scripting restriction (for html/ajax/flash code). However, I am afraid by enabling mod_proxy, I would risk having the server as open proxy.
What's the risk, and how to minimize the risk, in short?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您特别提到了 ProxyPass,我假设您使用 mod_proxy 作为反向代理。
如果是这种情况,只需确保 ProxyRequests 已关闭即可。 反向代理不需要它。
在转发代理配置中,如果您要启用 ProxyRequests 而不设置访问限制(即允许哪些主机/网络使用代理),您可以很容易地得到开放代理。
有关详细信息,请参阅 mod_proxy 文档。
Since you specifically mentioned ProxyPass, I'll assume you're using mod_proxy as a reverse proxy.
If that's the case, just make sure ProxyRequests is off. It isn't needed for reverse proxies.
In a forward proxy configuration, if you were to enable ProxyRequests without setting access restrictions (i.e., which hosts/networks are allowed to use the proxy) you could very easily wind up with an open proxy.
See the mod_proxy documentation for more info.
只需确保将 ProxyRequests 设置为关闭:
这会阻止 Apache 充当转发代理服务器(这是开放代理的担忧所在),但不会使用 ProxyPass 影响其作为反向代理的使用
Just make sure to set ProxyRequests to Off:
This prevents Apache from acting as a forward proxy server (which is where the concern about an open proxy comes in), but does not affect its use as a reverse proxy using ProxyPass