Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 11282 invoked from network); 10 Feb 2010 21:48:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2010 21:48:23 -0000 Received: (qmail 83729 invoked by uid 500); 10 Feb 2010 21:48:20 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 83689 invoked by uid 500); 10 Feb 2010 21:48:19 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 83680 invoked by uid 99); 10 Feb 2010 21:48:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 21:48:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of devraj@gmail.com designates 209.85.217.214 as permitted sender) Received: from [209.85.217.214] (HELO mail-gx0-f214.google.com) (209.85.217.214) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 21:48:10 +0000 Received: by gxk6 with SMTP id 6so474127gxk.4 for ; Wed, 10 Feb 2010 13:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Ay0i6Qf/adHNQuDH0fYLgVUGEJhXURe/MDOrPoD59SE=; b=EycrW/t1RN57fAr+tASw0DTJ8Aa/bWxsGOe1ZjsuYE+reGpRBFpFvT3CpyWPrlq78s ltR/Tiiz+tuI5qEKrumOTnIBpDWahDf0fk/xBT9bfSXihCTMcUYG95kcCLi/fq+Fj8zS nP0/0G91ZxQEO/Wy96kxx6/gtZF54GhSNboSs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Gf/4h6xxPbE6wZoL4OVSUPtIj4V43p7tgET7qKrPVios8bHFGIZTJjsKthZyOMLIFd 3Usrs2d8C+kKK7TQ1nn1HsZ/+MJUq4IHFAY2oUM0gru8F8Vx6Y61xMJXwqBqTU3YX9JB blU9P2J49brQCtlBNu6wXqEmSgmLspnF+85JM= MIME-Version: 1.0 Received: by 10.142.119.5 with SMTP id r5mr535540wfc.148.1265838467303; Wed, 10 Feb 2010 13:47:47 -0800 (PST) In-Reply-To: References: <2e027be01002080335q1eb748abk65aa1e07ec379741@mail.gmail.com> Date: Thu, 11 Feb 2010 08:47:47 +1100 Message-ID: <2d57c6571002101347q743c46deh6c5f5cff30da274a@mail.gmail.com> From: Devraj Mukherjee To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [users@httpd] Reverse Proxy incorrectly transform content Hi Pongtawat, We have worked on a similar issue with the Pentaho business intelligence suite. If you are using Apache 2.2 + You can use mob_substitute and have rules that change the domain name and fix these issues. I believe these issues are caused by dynamically generated URLs via JavaScript etc. Happy to share my configuration. Hope this helps. On Tue, Feb 9, 2010 at 3:20 PM, Pongtawat Chippimolchai wrote: > Dear Tom, > Thank you very much for clarifying this. That explains why it work correc= tly > if I save the page as HTML and let Tomcat serve it statically behind Apac= he > 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 wrot= e: >> >> On Mon, Feb 8, 2010 at 10:50 AM, Pongtawat Chippimolchai >> wrote: >> > Hello, >> > I'm using Apache to redirect request via reverse proxy to Tomcat on po= rt >> > 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: >> > > > href=3D"/Blog/CategoryRss?xpage=3Dplain&category=3DBlog.News" titl= e=3D"RSS"> >> > becomes: >> > > > class=3D"wikiexternallink">> > class=3D"wikimodel-freestanding" >> > >> > href=3D"http://wiki.knowledgesharing.in.th/Blog/CategoryRss?xpage=3Dpl= ain&amp;category=3DBlog.News">> > >> > class=3D"wikigeneratedlinkcontent">http://wiki.knowledgesharing.in.th/= Blog/CategoryRss?xpage=3Dplain&amp;category=3DBlog.News" >> > title=3D"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: =A0 Nov 13 2009 21:58:02 >> > Server version: Apache/2.2.12 (Ubuntu) >> > Server built: =A0 Nov 12 2009 22:51:51 >> > The reverse proxy is configured as follow: >> > >> > 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/ >> > >> > Options FollowSymLinks >> > AllowOverride None >> > >> > >> > 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, witho= ut >> > 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 Projec= t. >> See for more info. >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org >> For additional commands, e-mail: users-help@httpd.apache.org >> > > --=20 Follow me on Twitter, http://twitter.com/mdevraj "The secret impresses no-one, the trick you use it for is everything" - Alfred Borden (The Prestiege) --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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