Using Apache as proxy in port-forwarding role (inward to misbehaving NATted devices)

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Jun 18 16:15:41 UTC 2008


Matthew J. Roth wrote:
> Cameron Simpson wrote:
>> It does help if the internal device doesn't embed absolute URLs in its
>> web page output (which it may not, even if it looks like it
>> superficially).
>>
>> ...
>>
>> If the internal devices are embedding absolute URLs in their HREF links
>> you may need to run, additionally, a squid on your _local_ box, that
>> intercepts outbound URLs with the bad links and rewrites them (using the
>> http_redirect plugin), and then use that squid as your proxy.
>
> This problem can also be solved using the Apache module mod_proxy_html.
>
> From 'http://apache.webthing.com/mod_proxy_html/':
>
>  mod_proxy_html is an output filter to rewrite HTML links in a proxy 
> situation,
>  to ensure that links work for users outside the proxy. It serves the 
> same
>  purpose as Apache's ProxyPassReverse directive does for HTTP headers, 
> and is
>  an essential component of a reverse proxy.
>
> Depending on your application, there are several Apache modules that 
> you may need to get the proxy working correctly.  Here are a couple of 
> references to help you sort things out:
>
>  * http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
>  * http://www.apachetutor.org/admin/reverseproxies
>
> Good luck,
>
> Matthew Roth
> InterMedia Marketing Solutions
> Software Engineer and Systems Developer
>

Perfect!  That helps a lot.  The server in question generates some 
pretty broken HTML (it's a heat/comfort controller)... but it looks like 
this should be able to do the trick.  I just hope they don't generate 
any funky constructs.

The standard FC8 apache doesn't come with mod_proxy_html...  whither 
might I find it?

Or do I have to build from source?

Thanks,

-Philip




More information about the users mailing list