Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 73138 invoked from network); 17 Nov 2008 14:51:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2008 14:51:41 -0000 Received: (qmail 34975 invoked by uid 500); 17 Nov 2008 14:51:39 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 34966 invoked by uid 500); 17 Nov 2008 14:51:39 -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 34955 invoked by uid 99); 17 Nov 2008 14:51:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2008 06:51:39 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=SPF_PASS,URIBL_BLACK X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2008 14:50:15 +0000 Received: from [192.168.250.50] (p549EA712.dip0.t-ipconnect.de [84.158.167.18]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id mAHEkdrD007816 for ; Mon, 17 Nov 2008 15:46:40 +0100 Message-ID: <49218330.90803@ice-sa.com> Date: Mon, 17 Nov 2008 15:44:00 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/8637/Sat Nov 15 22:56:47 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-95.8 required=2.5 tests=DNS_FROM_SECURITYSAGE, RCVD_IN_PBL,RCVD_IN_SORBS_DUL,URIBL_BLACK,USER_IN_WHITELIST autolearn=no version=3.2.3 Subject: Re: [users@httpd] Rewrite relative image paths in a reversed proxy setup Bocalinda wrote: > This works perfectly as I expected. However, the problem I have is that some > images or links on my webapp are specified relatively. > For example , which results in errors because the > image cannot be found on the root of my server, which is logical. > Maybe just a note before you go make all kinds of changes. With an tag like above, it is not so that the server will look in the DocumentRoot. You have to look at it the other way around. The browser, when it sees this tag in the current page, is going to "compose" a URL to retrieve it, on the base of : - the URL at which it retrieved the current page (the one that contains the tag - removing the last component (iow the name of the page itself) - then substituting the "image.gif" part In other words, if the current page was retrieved at : http://yourserver.com/SEDO/subdir/mypage.html and that page contains the tag above, then the browser will retrieve the image at http://yourserver.com/SEDO/subdir/image.gif The server has nothing to do with it, it just tries to deliver what is requested by the browser. Now, for your static elements like images, you have two choices : - either you let things go as above, these requests will be forwarded to Tomcat, will be balanced, and it means your images should be at the corresponding locations in your Tomcat's - or you do something at the Apache level that will prevent these URLs to be passed to Tomcat, and you serve them locally at the Apache level. In other words you exclude links ending in ".gif", ".jpg", ".xxx" from the proxying. --------------------------------------------------------------------- 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