Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Reverse proxy error |
|
Author |
|
suraman
Joined: 17 May 2010 Posts: 3
|
Posted: Wed 02 Jun '10 7:14 Post subject: Reverse proxy error |
|
|
Hi,
I'm trying to setup a reverse proxy and followed the instructions in here 'http://www.apachetutor.org/admin/reverseproxies'.
If I don't fix the html links in my webpage, reverse proxy is working fine except for the couple of broken links.
But, when i try to fix the html links by adding either the setOutputFilter proxy-html or ProxyHTMLEnable On, I get a blank screen.
I'm new to Apache Webserver and not sure what's wrong. Can someone help please?
I've added this in my httpd.conf
<IfModule mod_proxy.c>
LogLevel Debug
ProxyHTMLCharsetOut *
ProxyHTMLLogVerbose On
</IfModule>
ProxyRequests off
<Proxy balancer://mycluster>
# cluster member 1
BalancerMember http://<server1>/itfs/ route=node1
# cluster member 2
BalancerMember http://<server2>/itfs/ route=node2
</Proxy>
Header add Set-Cookie "MYCOOKIE=SOMEVALUE.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED
ProxyPass /itfs/ balancer://mycluster/ stickysession=MYCOOKIE
<Location /itfs/>
ProxyPassReverse balancer://mycluster/
# SetOutputFilter proxy-html
ProxyHTMLEnable On
ProxyHTMLURLMap / /itfs/
RequestHeader unset Accept-Encoding
</Location>
My proxy-html.conf includes
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
LoadFile /bin/zlib1.dll
LoadFile /bin/iconv.dll
LoadFile /bin/libxml2.dll
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 frame src longdesc
ProxyHTMLLinks iframe src longdesc
ProxyHTMLLinks body background
ProxyHTMLLinks applet codebase
My error log prints this out:
[Wed Jun 02 11:52:55 2010] [debug] mod_proxy_http.c(1732): proxy: start body send
[Wed Jun 02 11:52:55 2010] [debug] mod_proxy_http.c(1836): proxy: end body send
[Wed Jun 02 11:52:55 2010] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (<server2>)
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(201): [client IP] Content-Type is text/html
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(270): [client IP] Charset ISO-8859-1 not supported by libxml2; trying apr_xlate
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(447): [client IP] xml2enc: consuming 975 bytes from bucket
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(471): [client IP] xml2enc: converted 975/975 bytes
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(447): [client IP] xml2enc: consuming 1042 bytes from bucket
[Wed Jun 02 11:52:55 2010] [debug] mod_xml2enc.c(471): [client IP] xml2enc: converted 1042/1042 bytes
[Wed Jun 02 11:52:55 2010] [debug] mod_headers.c(743): headers: ap_headers_output_filter() |
|
Back to top |
|
niq
Joined: 11 Aug 2007 Posts: 6
|
Posted: Wed 02 Jun '10 23:15 Post subject: |
|
|
Several strange things in your report. But I'd start by fixing the order of the arguments to ProxyHTMLURLMap. And you could get rid of that <IfModule> and put the contents of that inside your <Location>.
You should certainly be getting some mod_proxy_html debug messages in your log! |
|
Back to top |
|
suraman
Joined: 17 May 2010 Posts: 3
|
Posted: Thu 03 Jun '10 6:59 Post subject: |
|
|
I'm hosting two applications on my backend server (itfs and iddtms).
When i try to use Apache as reverse proxy for iddtms, everything works fine with the same configuration (after replacing itfs with iddtms).
However, i changed the order of arguments to ProxyHTMLURLMap as below:
ProxyHTMLURLMap /itfs/ /
Is this what you meant?
I've also got rid of the IfModule and put the contents inside <Location>
But there was no change in the result. I still get a blank screen.
Strange thing is i'm not getting any debug messages related to mod_proxy_html in my error log. |
|
Back to top |
|
|
|
|
|
|