使用 Apache 指令的反向代理
我正在尝试使用 Apache 指令进行反向代理,
我将得到如下网址: https://192.168.1.67:/fes-bin/public/ezidentity/js/jquery-1.2.6.js
我想要修改如下: https://192.168.1.70:9843/portal /ezidentity/js/jquery-1.2.6.js
现在我的配置文件的一部分是这样的 ::
ProxyPass /home/fes/public/ezidentity/ https://192.168.1.70:9843/portal/ezidentity/
ProxyPassReverse /home/fes/public/ezidentity/ https://192.168.1.70:9843/portal/ezidentity/
上面我写了 Alias /fes-bin/ "/home/fes/" 这就是我在 Pass* 指令中使用 "/home/fes/" 的原因。
这还不行。该页面仍然显示内容未找到,但是如果我直接通过浏览器访问它,文件就会被加载。
我使用的是 2.0 以上的 Apache 版本。
提前致谢。
I am trying to do reverse proxy using Apache directives
I will get a url like this: https://192.168.1.67:/fes-bin/public/ezidentity/js/jquery-1.2.6.js
I want to modify it like: https://192.168.1.70:9843/portal/ezidentity/js/jquery-1.2.6.js
now part of my configuration file is like this ::
ProxyPass /home/fes/public/ezidentity/ https://192.168.1.70:9843/portal/ezidentity/
ProxyPassReverse /home/fes/public/ezidentity/ https://192.168.1.70:9843/portal/ezidentity/
and above i have written Alias /fes-bin/ "/home/fes/" thats why i have used "/home/fes/" in Pass* directives.
this is not getting worked . The page still says content not found , however if i access it directly through browser file gets loaded .
i am using Apache version above 2.0 .
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据示例 URL,指令看起来应该如下所示。
编辑 我最近刚刚“玩”过 Apache 作为反向代理,所以我对此一无所知。然而,我确实很容易地让它工作。除了 ProxyPass 指令之外,我还指定了一个
Listen 8080
指令并在客户端请求中指定了该端口。也许值得尝试一下。Based on the example URL, it looks like the directives should be the following.
Edit I have just recently been "playing" with Apache as a reverse proxy, so I am by no means knowledgeable about it. I did, however, get it working very easily. In addition to the ProxyPass directives, I also specified a
Listen 8080
directive and specified that port in the client request. It may be worth trying that.