apache reverse proxy changes url

大兔子大兔子 提交于 2019-12-01 09:17:55

问题


i tried to configure apache's reverse proxy on a server to redirect the requests from /hotm to http://gateway.messenger.hotmail.com

typing the addres xxx.xxx.xxx.xxx/hotm in a browser, the request is redirected correctly, but the url in the address bar changes to "http://gateway.messenger.hotmail.com".

it's possible to configure the proxy on apache so that the address does not change?

[edit] this is the httpd.conf fragment

ProxyRequests Off
ProxyPass /hotm http://gateway.messenger.hotmail.com
ProxyPassReverse /hotm http://gateway.messenger.hotmail.com
<Directory /var/www/html/hotm>
 Order Allow,deny
 Allow from all
</Directory>
Redirect Permanent /hotm http://gateway.messenger.hotmail.com

回答1:


You must also set the ProxyPassReverse directive, typically to the same url as your ProxyPass value.



来源:https://stackoverflow.com/questions/5277107/apache-reverse-proxy-changes-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!