Apache2 Apache 2.2反向代理不工作
我正在尝试将我的apache(版本2.2.3)设置为反向代理。我在公共服务器上配置了apache,如中所述 internal1是本地网络中的其他服务器Apache2 Apache 2.2反向代理不工作,apache2,reverse-proxy,proxypass,Apache2,Reverse Proxy,Proxypass,我正在尝试将我的apache(版本2.2.3)设置为反向代理。我在公共服务器上配置了apache,如中所述 internal1是本地网络中的其他服务器 主页(www.example.com/app1/)显示正确,但问题发生在我的内部服务器执行重定向时。在本例中,我的浏览器(Firefox 3.5.3或Internet Explorer 7)在本地网络(internal1.example.com/page1/)中搜索地址。在我看来,ProxyPassReverse指令被apache忽略。就在Pro
主页(www.example.com/app1/)显示正确,但问题发生在我的内部服务器执行重定向时。在本例中,我的浏览器(Firefox 3.5.3或Internet Explorer 7)在本地网络(internal1.example.com/page1/)中搜索地址。在我看来,ProxyPassReverse指令被apache忽略。就在
ProxyPass
添加此参数ProxyPreserveHost On
这将保护主机。(http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost)当您从ProxyPassReverse中删除“page1/”时会发生什么?(ProxyPassReverse/app1/http&58;//internal1.example.com/)感谢您的回答,但没有帮助。我的浏览器仍尝试在本地网络中搜索地址。
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadFile /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
ProxyRequests off
ProxyPass /app1/ http://internal1.example.com/page1/
ProxyPassReverse /app1/ http://internal1.example.com/page1/
ProxyHTMLURLMap http://internal1.example.com/page1/ /app1/