Page 1 of 1

how to set user for access .htdocs folder ?

Posted: Fri Aug 29, 2003 2:37 am
by valen53
Purpose : prevent users access the "secret folder" under .htdocs.

after read through the apache manual, i still dunno how to block the .htdocs.
even i change the userdir to : UserDir disabled root
but not workingly.

copy from Apache manual / UserDir directive
To allow a few users to have UserDir directories, but not anyone else, use the following:
UserDir disabled
UserDir enabled user1 user2 user3
It mean we can set uset to accessing it, is it possible ? how to do it ?
i can't find the any tutorial from the manual.

anyone can help me ?

thank a lot

Posted: Fri Aug 29, 2003 9:22 am
by volka
I'm not quite sure what you want to achieve.
What do you mean... secret folder.
http://httpd.apache.org/docs-2.0/mod/mod_userdir.html#userdir wrote:UserDir Directive
[...]
Context: server config, virtual host
you can't use it in .htaccess.
If this is about authentication you might find http://httpd.apache.org/docs-2.0/howto/ ... .html#auth more interesting

Posted: Mon Sep 01, 2003 8:26 pm
by valen53
What do you mean... secret folder.
actully is the folder that only view by admin but not for client.
such as
user type URL ...
http://www.domain.com/picture/

so user can see the file in the picture folder.

But we dunwant to let them to browse this folder. only for admin can browse it.


thanks for ur reply

Posted: Mon Sep 01, 2003 9:04 pm
by volka
But we dunwant to let them to browse this folder. only for admin can browse it.
Not allow to access any file in this directory at all or just disable the index-view for non-admins?

Posted: Mon Sep 01, 2003 9:38 pm
by valen53
Not allow to access any file in this directory at all.

actually i have one solution. i put a index.php file to that directory.
so when user browse to that directory, they will redirect to my homepage again.

But any other ways to not allow user access it ?

Posted: Tue Sep 02, 2003 6:50 am
by volka
If this is about authentication you might find http://httpd.apache.org/docs-2.0/howto/ ... .html#auth more interesting