I am sorry in my last message I wrote
<Directory /usr/local/apache/htdocs/users/user01>
# User 01
Require user 224706
</Directory>
it should be
<Directory /usr/local/apache/htdocs/users/user01>
# User 01
Require user user01
</Directory>
You can userid like my previous example only if you are authenticating
against NIS or similar directory service.
http://www.stonebeat.org <---- WebDAV discussion forum
Saqib.N.Ali@seagate.com on 11/28/2001 09:15:47 PM
Please respond to users@httpd.apache.org
To: users@httpd.apache.org
cc:
Subject: Re: Password Directory
Hi Stefanus,
There are couple of ways you can do this. YOu can actually write a PHP
script and control access of each directory using .htaccess
I more sophisticated way of doing is using mod_rewrite and couple of of
directory containers in httpd.conf - This is only possible if you have
administrative access to HTTP deamon.
Here is how I would do it.
I would make the following entries in httpd.conf
<Directory /usr/local/apache/htdocs/users>
RewriteEngine on
RewriteCond #add some condition here#
RewriteRule .*
https://davtest1.seagate.com/users/%{REMOTE_USE} order allow,deny
allow from all
# Below define your favorite mechanism for authentication (e.g. LDAP, NIS,
MySQL, or htpasswd files etc.....)
#AuthName Users
#AuthType Basic
#<Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
# Require valid-user
# </Limit>
</Directory>
Now define user authentication requirements for each user directory.
<Directory /usr/local/apache/htdocs/users/user01>
# User 01
Require user 224706
</Directory>
<Directory /usr/local/apache/htdocs/users/user02>
# User 02
Require user 224706
</Directory>
<Directory /usr/local/apache/htdocs/users/user03>
# User 03
Require user 224706
</Directory>
Then create directory for each user under {users} directory.
Now when a users visit the following url
http://www.yoursite.dom/users He will be prompted for htaccess style authenticaton. Based on the userid,
mod_rewrite will re-direct the client to appropriate directory.
e.g. if user03 logs in, mod_rewrite will automatically re-direct him to
http://www.yoursite.dom/users/user03 Now this can be all done using .htacess file as well.
if you have run into any problems, let us know.
In Peace,
Saqib Ali
http://www.stonebeat.org <------ WebDAV discussion forum
"Stefanus Eko Yulianto" <eko@ntt.net.id> on 11/28/2001 07:52:58 PM
Please respond to users@httpd.apache.org
To: <users@httpd.apache.org>
cc:
Subject: Password Directory
Dear all,
I use apache 1.3 on my freebsd 4.3 server.
I have 10 user who each user have own private directory. How to configure
each user only can see their web page base on password.
TIA
eko
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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