Results 1 to 2 of 2

Thread: Apache2 proxy_module proxy_html_module

  1. #1
    Join Date
    Sep 2009

    Apache2 proxy_module proxy_html_module

    By any chance can anyone offer a hint - I'm tearing my hair out...

    I'm successfully hosting an https site on my single available public facing IP address - but I want to expose a couple of internal web sites. Essentially, I have:

    I want to expose the pages from as if they were hosted at and as if they were hosted at

    I get most of the way there by using mod_proxy and the directive:

    ProxyPass /app1

    Unfortunately, for example, the site references using the relative URI "/style.css". Sure, if designing these apps from scratch this would not be a choice I'd make - but I need to treat these apps as 'black boxes' - which means I need to do some sort of URL rewriting on the pages I serve as

    From the web I discovered that proxy_html_module is the recommended approach here - and then my problems began. From the somewhat sparse documentation, I came up with the following configuration fragment:

    ProxyRequests Off
    ProxyPass /app1
    ProxyHTMLURLMap /app1
    <Location /app1>
    SetOutputFilter proxy-html
    ProxyHTMLURLMap / /app1/

    When I visit, I now get some errors. The browser says:

    "Content Encoding Error

    The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

    When I check the apache logs, I find these errors:
    [Thu Mar 03 12:31:02 2011] [error] [client] Charset "utf-8" not su pported. Consider aliasing it or use metafix?
    [Thu Mar 03 12:31:02 2011] [warn] [client] No usable charset infor mation; using configuration default

    Here, I've come unstuck. Should I be thinking about aliasing character sets, and if so, how? What is metafix - is it really relevant? All google suggested was the source code for the module... where I found this comment about the error message:

    /* Unsupported charset. Can we get (iconv) support through apr_xlate? */
    /* Aaargh! libxml2 has undocumented <META-crap> support. So this fails
    * if metafix is not active. Have to make it conditional.

    Is there a straightforward way to get this working under Ubuntu? Am I making things difficult for myself trying to use ProxyHTMLURLMap?

  2. #2
    Join Date
    Sep 2009

    Re: Apache2 proxy_module proxy_html_module

    OK... The problem with character set is resolved using the line:

    RequestHeader unset Accept-Encoding

    Unfortunately, still, none of the URIs in the HTML are being translated...

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts