gpt4 book ai didi

Apache - 反向代理和 HTTP 302 状态消息

转载 作者:行者123 更新时间:2023-12-04 01:48:19 24 4
gpt4 key购买 nike

我的团队正在尝试将 Apache 反向代理从客户站点设置到我们的 Web 应用程序之一。

http://www.example.com/app1/some-path映射到 http://internal1.example.com/some-path

在我们的应用程序中,我们使用 struts 并在某些操作上设置了 redirect = true 以提供某些功能。来自这些重定向的 302 状态消息会导致用户脱离代理,从而导致最终用户出现错误页面。

发现 HTTP/1.1 302
地点:http://internal.example.com/some-path/redirect

有没有办法在 apache 中设置反向代理,以便重定向正常工作?

http://www.example.com/app1/some-path/redirect

最佳答案

有一篇文章标题是Running a Reverse Proxy in Apache这似乎解决了您的问题。它甚至使用与示例中相同的 example.com 和/app1。有关如何使用的示例,请转到“配置代理”部分 ProxyPassReverse .

关于Apache - 反向代理和 HTTP 302 状态消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/189451/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com