You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by electro <el...@gmail.com> on 2010/12/28 18:41:31 UTC
[users@httpd] mod_html_proxy problem
All,
I am experiencing the following issues:
1. When I hit http://<ip address>/url1/ it first forwards me to
www.sears.com. 2nd try kicks the reverse proxy in action. Why does it take
a 2nd try and doesnt work on the 1st?
2. For some reason, the reverse proxy is trying to fetch *.js files off the
remote server from the rewritten URLs. I am using ProxyHTMLURLMap with
"ec" to prevent the rewriting of scripts, but it keeps giving me a 404 error
with my config as it tries to fetch the *.js files from the rewritten URL.
Any assistance is much appreciate. Thank you!
Please review the following apache config:
####################################################################
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/lib64/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
LoadModule deflate_module modules/mod_deflate.so
# We're using SSL upstream, so we must enable it.
SSLProxyEngine on
ProxyRequests off
# By default, iframes are not searched.
ProxyHTMLLinks a href
ProxyHTMLLinks area href
ProxyHTMLLinks link href
ProxyHTMLLinks img src longdesc usemap
ProxyHTMLLinks object classid codebase data usemap
ProxyHTMLLinks q cite
ProxyHTMLLinks blockquote cite
ProxyHTMLLinks ins cite
ProxyHTMLLinks del cite
ProxyHTMLLinks form action
ProxyHTMLLinks input src usemap
ProxyHTMLLinks head profile
ProxyHTMLLinks base href
ProxyHTMLLinks script src for
ProxyHTMLLinks iframe src
ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \
onmouseover onmousemove onmouseout onkeypress \
onkeydown onkeyup onfocus onblur onload \
onunload onsubmit onreset onselect onchange
# Enable debug logging.
ProxyHTMLLogVerbose On
LogLevel Debug
ProxyHTMLExtended On
ProxyHTMLMeta On
ProxyPass /url1/ http://www.sears.com/
<Location /url1/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /url1/ ec
ProxyPassReverseCookiePath / /url1/
RequestHeader unset Accept-Encoding
</Location>
##########################################################################