Forum Moderators: phranque
Now the story:
I have set up virtual host in apache, something like download.mydomain.com. The directory is overriden with .htaccess file - the only line is:
Options Indexes
It's all good- I can see directory listing. Now i wanted to passwordprotect subdirectory- download.mydomain.com/protecteddir/ so i added another .htaccess file in this subfolder, containg following lines:
AuthType Basic
AuthName protected
AuthUserFile /path/to/.htpasswd
Require valid-user
Now here's the problem- this protected folder now is not showing up any more on the list in the root directory tree (when i navigate back to download.mydomain.com, it seems /protecteddir/ is just hidden). How can i solve this? If I type manually in the location bar full path of protected dir, i can successfully log in/access it. But I really want to see this folder in root tree. Is this possible?
Linux,
Apache 2.2.0 (and same also on 2.0.55).
--
tnx, Paul.
What do you mean by DocumentRoot? To add +Indexes to the whole server in httpd.conf? That would not be a good idea i think. Note that I tried that also :), but I don't think it has to solve my problem.
Instead I configured apache to AllowOverride All for my /server/download.mydomain.com directory AND there put .htaccess file with Options Indexes directive. (also tried +Indexes).
With this I can see directory listing for every (sub)folder on my download.mydomain.com, but when I make another .htaccess file in one of the subfolders with "Require valid-user" directive then boom- protected directory is not showing up any more. :/ I still can access this folder and see it's directory listing after authorization, but it's gone from the root list.. confused..