httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pongtawat Chippimolchai <pongtawat....@gmail.com>
Subject Re: [users@httpd] Reverse Proxy incorrectly transform content
Date Tue, 09 Feb 2010 04:20:09 GMT
Dear Tom,

Thank you very much for clarifying this. That explains why it work correctly
if I save the page as HTML and let Tomcat serve it statically behind Apache
reverse proxy. So, there must be something wrong with XWiki apps when
working behind Apache. I have checked the request that was send to Tomcat
and it seems ok. So, it might be something in the header or environment?

Thank you,
Pongtawat

On Mon, Feb 8, 2010 at 6:35 PM, Tom Evans <tevans.uk@googlemail.com> wrote:

> On Mon, Feb 8, 2010 at 10:50 AM, Pongtawat Chippimolchai
> <pongtawat.ait@gmail.com> wrote:
> > Hello,
> > I'm using Apache to redirect request via reverse proxy to Tomcat on port
> > 8080. On most of the pages, it will work flawlessly. However, on some
> pages,
> > it seems that Apache will incorrectly modify the HTML content (IMO, as
> part
> > of URL transformation). For example the following code:
> > <span class="blog-category-level"><a
> > href="/Blog/CategoryRss?xpage=plain&amp;category=Blog.News" title="RSS">
> > becomes:
> > <span class="blog-category-level"><a href="<span
> class="wikiexternallink"><a
> > class="wikimodel-freestanding"
> > href="
> http://wiki.knowledgesharing.in.th/Blog/CategoryRss?xpage=plain&amp;amp;category=Blog.News
> "><span
> > class="wikigeneratedlinkcontent">
> http://wiki.knowledgesharing.in.th/Blog/CategoryRss?xpage=plain&amp;amp;category=Blog.News
> </span></a></span>"
> > title="RSS">
> > with a mysterious span code inside href attribute.
> > FYI, the original HTML validated as XHTML 1.0 Strict.
> > I have no idea what cause this. Please help.
> > My setting is as follow.
> > Apache version:
> > I have this issue with Apache on both Ubuntu 8.04 and 9.10, i.e. the
> > following versions:
> > Server version: Apache/2.2.8 (Ubuntu)
> > Server built:   Nov 13 2009 21:58:02
> > Server version: Apache/2.2.12 (Ubuntu)
> > Server built:   Nov 12 2009 22:51:51
> > The reverse proxy is configured as follow:
> > <VirtualHost *:80>
> > ServerName wiki.knowledgesharing.in.th
> > ServerAdmin "admin AT knowledgesharing DOT in DOT th"
> > ServerSignature Email
> > ProxyPass / http://wiki.knowledgesharing.in.th:8080/
> > ProxyPassReverse / http://wiki.knowledgesharing.in.th:8080/
> > <Directory />
> > Options FollowSymLinks
> > AllowOverride None
> > </Directory>
> > </VirtualHost>
> > The site is live, so you could try it at:
> > http://wiki.knowledgesharing.in.th/Blog/ (via Apache reverse proxy)
> > http://wiki.knowledgesharing.in.th:8080/Blog/ (direct to Tomcat, without
> > reverse proxy)
> > Thank you very much,
> > Pongtawat
>
> ProxyPass and ProxyPassReverse do not modify the HTML content of the
> page. From the docs of ProxyPassReverse:
>
> Only the HTTP response headers specifically mentioned above will be
> rewritten. Apache will not rewrite other response headers, nor will it
> rewrite URL references inside HTML pages. This means that if the
> proxied content contains absolute URL references, they will by-pass
> the proxy. A third-party module that will look inside the HTML and
> rewrite URL references is Nick Kew's mod_proxy_html.
>
> Cheers
>
> Tom
>
> ---------------------------------------------------------------------
> 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
>
>

Mime
View raw message