I have the following directory hierarchy
-root_folder
.htaccess
-sub_folder
.htaccess
The content of the .htaccess file in sub_folder:
AuthType Basic
AuthName "webdav"
AuthUserFile /var/www/test/passwd.dav
Require user test
root_folder
contains the following .htaccess
Satisfy any
Order deny,allow
Deny from all
Allow from env=ALLOWED
SetEnvIfNoCase Request_URI "^/+webdav/root_folder/?$" ALLOWED
Note, please, that i am using WebDav
.
It is set up in /etc/apache2/conf.d/webdav
. The file contains the following:
Alias /webdav /home/user/projects/test/public
<Location /webdav/>
Order Allow,Deny
Allow from #list of ips here
DAV On
PassengerEnabled off
LimitXMLRequestBody 0
Options Indexes FollowSymLinks
</Location>
The problem is that when i try to access localhost/webdav/root_folder/
folder using browser the sub_folder
is not displayed.
But when i remove the Require user some_user
directive the sub_folder
is shown in the list. If i try to enter localhost/webdav/root_folder/sub_folder/
when Require user
directive is enabled i'm asked to enter login and password and everything is ok if i enter correct credentials.
Is it possible to list everything within directory and at the same time use require user
directives in .htaccess files inside sub_folders to control access to them?