Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 23211 invoked from network); 2 Oct 2003 12:09:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Oct 2003 12:09:17 -0000 Received: (qmail 28064 invoked by uid 500); 2 Oct 2003 12:09:00 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 28053 invoked by uid 500); 2 Oct 2003 12:09:00 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 28039 invoked from network); 2 Oct 2003 12:09:00 -0000 Received: from unknown (HELO amsfep13-int.chello.nl) (213.46.243.24) by daedalus.apache.org with SMTP; 2 Oct 2003 12:09:00 -0000 Received: from clerc.nl ([24.132.97.2]) by amsfep13-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20031002120859.ZGEG24716.amsfep13-int.chello.nl@clerc.nl> for ; Thu, 2 Oct 2003 14:08:59 +0200 Received: by clerc.nl (Postfix, from userid 501) id B59BF7714; Thu, 2 Oct 2003 14:08:58 +0200 (CEST) Date: Thu, 2 Oct 2003 14:08:58 +0200 From: =?iso-8859-1?Q?Ren=E9?= Clerc To: users@httpd.apache.org Message-ID: <20031002120858.GE19387@clerc.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Host-Info: clerc.nl, Linux 2.2.25, up for 67 days X-PGP-Key: http://www.clerc.nl/~rene/pubkey.asc User-Agent: Mutt/1.5.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Apache 1.3 VirtualHost in combo with rewrite X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi all, I have a problem which, AFAICT, can be solved using VirtualHosts, but I just haven't yet found out how ;-) We've built a Tomcat application that needs to be accessible through Apache (1.3). If a user accesses, let's say, http://www.foo.com, Apache redirects the user to the Tomcat application (running on port 8080). If a user tries to access http://www.bar.com, which resolves to the same IP address, the user will *not* be redirected, but served an error page. In fact, I want this to happen when the user types anything *but* http://www.foo.com (including the direct IP address). The proxying and rewriting between Apache and Tomcat works great, using mod_rewrite and mod_proxy. It's just these accessibility demands I recently came up with, that I can't get to work. I've tried: ServerName www.foo.com ErrorDocument 500 /error500.html RewriteEngine On RewriteCond $1 !error RewriteRule (.*) http://localhost:8080/$1 [P] ProxyPassReverse / http://localhost:8080/ DocumentRoot /var/www/html and probably most variations in order, changing _default_ to either the IP address or www.bar.com, but nothing worked: currently, no matter what the user types in, (s)he's always redirected to the Tomcat application. Am I on the right track? Does anybody know how to solve my problem? Thanks in advance, -- Ren� Clerc - (rene@clerc.nl) - PGP: 0x9ACE0AC7 228. If the hero claims he wishes to confess in public or to me personally, I will remind him that a notarized deposition will serve just as well. -"Peter Anspach's list of things to do as an Evil Overlord" --------------------------------------------------------------------- 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