You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dirk Taggesell <di...@taggesell.de> on 2006/01/22 17:58:44 UTC

[users@httpd] mod_proxy_html doesn't rewrite as commanded

Hello Apache users,

Recently I sat up a reverseproxy (Apache 2.0.53, FreeBSD) for providing
Outlook Web-Access to a certain group of users.

What makes it somewhat sophisticated is that the reverseproxy itself is
located behind a firewall and has only a local IP address. So it has to
rewrite every (internal) hostname or IP address in html documents to the
external hostname that is seen from the outside.

With mod_proxy_html this works for all the occurances in normal html
source but the modul refuses to rewrite internal addresses into CSS
descriptions. (I managed to have the hostname rewritten whenever it
occurs in Javascript parts of the documents)
If I look into the source of the delivered document it still shows the
internal URL in between CSS statements.

My Configuration is as follows:
ProxyPass / http://10.11.12.13/
ProxyPassReverse / http://10.11.12.13/

SetOutputFilter  proxy-html
ProxyHTMLExtended On
ProxyHTMLURLMap 'http://10.11.12.13' 'https://hostname.example.com'

The host 10.11.12.13 is the Windows Server delivering the OWA documents,
'https://hostname.example.com' is the hostname for access from the outside.

Most likely my filter definition is not entirely correct, but the
several documentations on the mod_proxy_html website don't help me much.

Are my config directives ok? Am I missing something?

For instance, one of the culprits looks this way:
----------------------------
<div id="idMsgViewer" class="msgViewer" accesslevel="63" acceptlang="de"
rowsperpage="25" url="http://10.11.12.13/exchange/dirk/Inbox/"
onready="onViewReady()" onrefresh="onViewRefresh()"
onbeforerefresh="onBeforeViewRefresh()" onkeydown="onViewKeyDown()"
onkeypress="onViewKeyPress()" oncontextmenu="return(false);"
refreshthreshold="20%" viewdescriptor="xmlDefaultView"
onchangesort="persistSortOrder()" onerror="onViewError()"
onnavigate="onViewNavigation()" onselectionchange="updatePreviewPane()"
allowquickflag="1" followuptext="Nachverfolgung" loadingtext="Wird geladen"
nextseldir="1">

----------------------------

I asked this question in alt.apache.configuration some weeks ago,
received some help, but the problem still exists.
Link:
<http://groups.google.com/group/alt.apache.configuration/browse_frm/thread/8f2979bea18721e9/e7e2af323f400f8c?lnk=st&q=group%3Aalt.apache.configuration+insubject%3Aproblem+insubject%3Amit+insubject%3Amod_proxy_html&rnum=1&hl=en#e7e2af323f400f8c>

-- 
Thanks in advance
Dirk Taggesell


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy_html doesn't rewrite as commanded

Posted by Nick Kew <ni...@webthing.com>.
On Sunday 22 January 2006 16:58, Dirk Taggesell wrote:

> For instance, one of the culprits looks this way:
> ----------------------------
> <div id="idMsgViewer" class="msgViewer" accesslevel="63" acceptlang="de"
> rowsperpage="25" url="http://10.11.12.13/exchange/dirk/Inbox/"

Hmmm, didn't notice that just now.  mod_proxy_html has builtin knowledge
of HTML4/XHTML1 and won't touch proprietary junk like that unless
you add them to the url attributes.

If/when I get around to releasing mod_proxy_html 3.0, that's moving to
the configuration, so you can use it with non-HTML backends like that
without touching the code.  Note that you can also do the job with
mod_publisher.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy_html doesn't rewrite as commanded

Posted by Nick Kew <ni...@webthing.com>.
On Sunday 22 January 2006 16:58, Dirk Taggesell wrote:

> SetOutputFilter  proxy-html
> ProxyHTMLExtended On
> ProxyHTMLURLMap 'http://10.11.12.13' 'https://hostname.example.com'

You seem to be missing the flags to that rule.
(and BTW, why the quoted values?)

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org