From owner-freebsd-isp Mon Oct 2 18:21:19 2000 Delivered-To: freebsd-isp@freebsd.org Received: from modemcable101.200-201-24.mtl.mc.videotron.ca (modemcable140.61-201-24.mtl.mc.videotron.ca [24.201.61.140]) by hub.freebsd.org (Postfix) with SMTP id 9FBFC37B66C for ; Mon, 2 Oct 2000 18:20:57 -0700 (PDT) Received: (qmail 26910 invoked from network); 3 Oct 2000 01:20:57 -0000 Received: from patrak.local.mindstep.com (HELO PATRAK) (192.168.10.4) by jacuzzi.local.mindstep.com with SMTP; 3 Oct 2000 01:20:57 -0000 Message-ID: <033901c02cd8$414b5cf0$040aa8c0@local.mindstep.com> From: "Patrick Bihan-Faou" To: References: <008301c02c89$0cfcce10$112821c4@sai.co.za> <20001002194644.E22554@databits.net> Subject: Re: Off topic a bit, apache authenication Date: Mon, 2 Oct 2000 21:21:28 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org ----- Original Message ----- From: "Pete Fritchman" Newsgroups: list.freebsd.isp > Some perl should do this for you. After a user authenticates through http, an > environment variable with their username is set (REMOTE_USER). You can make an > access file on your local system, maybe in the format 'user: redirect'. The > perl could read this file and redirect the user based on their username. Just > stick this code in index.cgi, add that to the DirectoryIndex httpd.conf setting, > and tell apache to treat .cgi as a cgi script - 'AddHandler cgi-script .cgi' > This will get you through. > Note this would not protect them from seeing other companies mrtg stats; the > best prevention with this method would be to give each company a seemingly > random directory name (say, mrtg.yourdomain.com/K83J091, you get the idea) and > redirect them to that. > You can actually prevent users from seeing each others information by setting the correct access requirements in each directory: for user A, directory /usr/local/www/userA/ contains a .htaccess file with something like "require user usera" in it. You can also do that in your main apache.conf file. Patrick. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message