httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject [users@httpd] Access Question
Date Mon, 26 Jul 2004 16:17:52 GMT
On Mon, 26 Jul 2004 11:01:13 -0400, Bill Guion <bguion@sgt-inc.com> wrote:
> At 10:38 AM -0400 on [m-d-y] 7/26/04, Joshua Slive wrote with subject

> >How are you doing the authentication?  Is it HTTP basic auth?  Cookie
> >based sessions through php?  Something else?
>
> Right now we use .htaccess, with one .htaccess file for the first
> page (all users log in through that) and other .htaccess files for
> the linked pages that have limited access. All of this runs on the
> same server.

When you say ".htaccess", you actually mean "HTTP Basic auth".
".htaccess" is simply the name of the configuration file.

>
> intranet directory
>    home page (all users log in through .htaccess)
>      linked page 1 (all users access)
>      ...
>      linked page n (all users access)
>      linked page x (limited to group x, must log in through .htaccess)
>      linked page y (limited to group y, must log in through .htaccess)
>      linked page z (limited to group z, must log in through .htaccess)
>
> What I would proposed to do is have (in this example) four versions
> of the home page. Version 1 would have just those links available to
> everyone. Version x would have the links available to everyone, plus
> those links available to group x. Version y would have the links
> available to everyone, plus those links available to group y. Version
> z would have the links available to everyone, plus those links
> available to group z. The goal, as Joshua surmised, would be to
> require only one login to get to the set of web pages you are
> entitled to see.

Although this can be done in apache alone, this is a case where I'd be
very tempted to use a dynamically generated page (php, cgi, whatever)
to look at the REMOTE_USER environment variable and change the page
based on what it sees.

In addition, I'd give up your idea of using separate host names for
the different users.  This will just create problems because the user
*will* need to login again.  Use different directories under one
hostname.

If you really want to do this with apache alone, you'll need to get
familiar with mod_rewrite, which can direct you to different pages
based on the contents of the REMOTE_USER environment variable.  You
may need to use a RewriteMap to create a file mapping usernames to
page names.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message