This is a discussion on Question about <Limit> and require within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi! I'm trying to understand how <Limit> (or <LimitExcept>) and require interact. I'm trying ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I'm trying to understand how <Limit> (or <LimitExcept>) and require interact. I'm trying to set up a WebDAV directory with subdirectories for users. Access to any part of the directory requires a password. The subdirectories are only to be accessible by the respective users, and only the admin user can create or modify something in the main directory. Here's my latest attempt: ><Location /dav> > DAV On > AllowOverride None > Options None > AuthName "DAV" > AuthType Basic > AuthUserFile /var/www/hpw > <LimitExcept GET HEAD OPTIONS> > Require user admin > </LimitExcept> > Require valid-user ></Location> ><Location /dav/user1> > require user user1 ></Location> ><Location /dav/user2> > require user user2 ></Location> This almost works - you must provide a user name or password for access, and only user1 can access the /dav/user1 directory. But any logged in user can change or modify files in the /dav directory. It appears as though the "require valid user" takes precedence over the limit block. But if I remove it, only admin can log in. I've also tried multiple <Limit> blocks for the location without any luck. Thanks! -- bill |