Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2000 21:21:28 -0400
From:      "Patrick Bihan-Faou" <patrick@mindstep.com>
To:        <freebsd-isp@freebsd.org>
Subject:   Re: Off topic a bit, apache authenication
Message-ID:  <033901c02cd8$414b5cf0$040aa8c0@local.mindstep.com>
References:  <008301c02c89$0cfcce10$112821c4@sai.co.za> <20001002194644.E22554@databits.net>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----
From: "Pete Fritchman" <petef@databits.net>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?033901c02cd8$414b5cf0$040aa8c0>