From owner-freebsd-isp Mon Oct 2 16:46:54 2000 Delivered-To: freebsd-isp@freebsd.org Received: from databits.net (analog.databits.net [207.29.192.55]) by hub.freebsd.org (Postfix) with SMTP id 00AA537B502 for ; Mon, 2 Oct 2000 16:46:51 -0700 (PDT) Received: (qmail 22775 invoked by uid 1000); 2 Oct 2000 23:46:44 -0000 Date: Mon, 2 Oct 2000 19:46:44 -0400 From: Pete Fritchman To: Dave Wilson Cc: freebsd-isp@FreeBSD.ORG Subject: Re: Off topic a bit, apache authenication Message-ID: <20001002194644.E22554@databits.net> References: <008301c02c89$0cfcce10$112821c4@sai.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <008301c02c89$0cfcce10$112821c4@sai.co.za>; from davew@sai.co.za on Mon, Oct 02, 2000 at 05:54:24PM +0200 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Dave, 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' 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. Regards, Pete ++ 02/10/00 17:54 +0200 - Dave Wilson: >Hi guys, howzit going? > >I want to setup a page for our clients with Apache so that they have to >logon using their own username/password which will then take them to their >respective folders under the root web so that they can view their MRTG's. >I can setup authentication with apache on each clients separate folder but I >do not want 30 different links on the opening page that will the require the >client to click on his respective company name and then enter in his >username/password, I want each client to click on one common link and then >be taken to his correct graph based on the username he/she enters. >I know this question doesn't really belong in this list, any one got any >ideas on how to do this ? > >Regards >Dave Wilson >The S.A. Internet >(033) 3456777 >0825496159 >http://www.sai.co.za >"Who is "General Failure", and what is he doing reading my hard disk ?" > > > > > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-isp" in the body of the message -- Pete Fritchman Databits Network Services, Inc http://www.databits.net finger: petef@analog.databits.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message