You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nicolas Kowalski <Ni...@imag.fr> on 2002/04/23 11:29:12 UTC

Restrict public_html to some users

Hello.

IS there a smart way to make Apache read the Userdir directories only
for some allowed users, without use of .htaccess files (these can be
deleted by users).

For example : user1 and user2 both have "~/public_html/" directories,
but I only want user1 being able to have a personal web page. The URL
http://server/~user2/ should return an error, and
http://server/~user1/ should work.


In my actual configuration, personal web pages are stored on a
separate disk, on which I create allowed user directories, and I use
some rewrite rule :

UserDir /path/to/user/pages/PEOPLE
RewriteEngine on
RewriteLog /var/log/httpd/verimag/rewrite.log
RewriteRule ^/path/to/user/pages/~(.*) /PEOPLE/$1


Any ideas ?

Thanks in advance,
Nicolas.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Restrict public_html to some users

Posted by Nicolas Kowalski <Ni...@imag.fr>.
Simon Oliver <si...@umist.ac.uk> writes:

>>>From the docs...

Hm, I should have read more carefully these...I was not expecting
the `Userdir' directive had such options.

Thanks a lot.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Restrict public_html to some users

Posted by Simon Oliver <si...@umist.ac.uk>.
>From the docs...

Additional examples:

To allow a few users to have UserDir directories, but not anyone else, use
the following:

UserDir disabled
UserDir enabled user1 user2 user3
To allow most users to have UserDir directories, but deny this to a few,
use the following:

UserDir enabled
UserDir disabled user4 user5 user6

--
  Simon Oliver

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org