httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rickard, Ronald" <>
Subject [users@httpd] mod_proxy_html and AJAX call that returns HTML response?
Date Wed, 10 Apr 2013 00:41:33 GMT

I am attempting to front a 3rd party application, OpenStack Horizon, with an Apache reverse
proxy.  I have most of the Apache configuration working, except one page in the 3rd party
application that has an AJAX call (JQuery).  That page is broken because mod_proxy_html is
adding <!DOCTYPE html><html><body> elements to the AJAX HTML response which
is included on the page as a table row.

I am using a RHEL 6.3 server.  The Apache is version 2.2.15 and the mod_proxy_html is version
3.1.2.  The HTTP configuration reads:

<VirtualHost *:80>
    # Setup reverse proxy.
    ProxyRequests Off
    ProxyHTMLEnable On
    ProxyHTMLExtended On
    ProxyHTMLInterp On

    # Ensure proper DOCTYPE for OpenStack Horizon application.
    ProxyHTMLDocType "<!DOCTYPE html>"

    # Reverse proxy OpenStack Horizon risk.
    ProxyPass /some/directory/ http://somehost/
    ProxyPassReverse /some/directory/ http://somehost/
    ProxyHTMLURLMap http://somehost /some/directory
    <Location /some/directory/>
        RequestHeader set Referer "http://somehost/"
        Header edit X-Horizon-Location /dashboard/(.*) /some/directory/dashboard/$1
        ProxyHTMLURLMap /static /some/directory/static [RL]
        ProxyHTMLURLMap / /some/directory/ [RLc]
        AddOutputFilterByType SUBSTITUTE text/css text/javascript
        Substitute "s|/static/|/some/directory/static/|iq"
        Substitute "s|/dashboard/|/some/directory/dashboard/|iq"

Is there a way to suppress the addition of the <!DOCTYPE html><html><body>
on the AJAX HTML response?  

I was thinking I would ignore the AJAX HTML response in the configuration, except I have been
unable to use the condition option in the ProxyHTMLURLMap.  Does anyone have an example of
how to use it?  I have tried:

    ProxyHTMLURLMap / /some/directory/ [RLc] !${QUERY_STRING}=^action\=row_update

The URL for the AJAX call differentiates itself by having a QUERY_STRING which starts with

Any assistance you can provide would be greatly appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message