Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 24290 invoked from network); 7 Dec 2005 21:37:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Dec 2005 21:37:05 -0000 Received: (qmail 60788 invoked by uid 500); 7 Dec 2005 21:36:55 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 60597 invoked by uid 500); 7 Dec 2005 21:36:54 -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 60570 invoked by uid 99); 7 Dec 2005 21:36:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 13:36:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.158.65.26] (HELO mail.cityofevanston.org) (66.158.65.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 13:36:53 -0800 Received: from exchange2k.local.cityofevanston.org ([10.25.1.25]) by mail.cityofevanston.org with Microsoft SMTPSVC(6.0.3790.0); Wed, 7 Dec 2005 16:31:58 -0600 Received: EXCHANGE2K 10.25.1.25 from 10.1.20.20 10.1.20.20 via HTTP with MS-WebStorage 6.0.6249 Received: from morpheus by EXCHANGE2K; 07 Dec 2005 21:36:13 +0000 From: Jason Martens To: users@httpd.apache.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: City of Evanston Date: Wed, 07 Dec 2005 15:36:13 -0600 Message-Id: <1133991373.16290.11.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 X-OriginalArrivalTime: 07 Dec 2005 22:31:58.0921 (UTC) FILETIME=[093A8B90:01C5FB7E] X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] redirect X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Wed, 2005-12-07 at 12:37 -0500, mwlist wrote: > I'm setting up a system and need some advice the situation is described below. > > Currently > Machine 1 is a linux box with apache 2 serving our main site www.site.com > Machine 2 has our users personal web site data which users upload with > shell access. > Machine 1 nfs mounts machine 2 and serves the user pages at www.site.com/~user > > I would like to get rid of the NFS mount. > > So can I have apache 2 forward requests for www.site.com/~user to > machine 2 and still retain the same url? I was thinking of using > mod_alias to do this. > Redirect /~* http://machine2.com/~* > Any ideas? Mod_alias only uses paths on the local server, so that's not what you are looking for. You probably want to use mod_proxy or mod_rewrite with the [P] option for proxying. ModRewrite would probably require the least amount of apache configuration, once you get the right regular expression that is. Something like "ProxyPass /~user http://machine2.com/~user" might work, but to avoid putting a line like that in your apache config for each user, you probably want to use a RewriteRule something like this: RewriteRule /~(.*) http://machine2.com/~$1 [P] Note, I'm not terribly good with mod_rewrite, but this should get you started. You could also use the Redirect directive, but that would point your clients to the other server so www.site.com/~user would become http://machine2.com/~user in your client's url, and I don't think that's what you want. Jason Martens --------------------------------------------------------------------- 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