LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2: showing password protected directories (https://www.linuxquestions.org/questions/linux-software-2/apache2-showing-password-protected-directories-253960/)

hamish 11-12-2004 06:02 AM

Apache2: showing password protected directories
 
Hello

I have a number of password protected folder on my home server. They are all sub directories of a directory which everyone has access to. The server auto indexes each directory.

Eg: everyone can access http://blah.blah.com/~hamish/ but the sub directory http://blah.blah.com/~hamish/protected/ has a .htaccess file in it requiring a password.

At the moment, if you are in http://blah.blah.com/~hamish/, you can't see the "protected" directory.

I would like to be able to see the folder link of the protected folder so I can click on it and then enter my password. At the moment, have to type in the full address (http://blah.blah.com/~hamish/protected/), and then put my password in, before I can see inside that folder.

The question is, how can I show the password protected folder in the non-password protected directory?

I think it is something to do with AllowOverride, but I'm not quite sure how that works.

Thanks in advance
Hamish

david_ross 11-12-2004 12:59 PM

You will need to set the Indexes option in the Options directive.

hamish 11-13-2004 11:43 AM

Do you know what I need to set it to?

thanks
Hamish

david_ross 11-13-2004 12:34 PM

yes, "Indexes" - ie you need a line like:
Options Indexes

Within the <Directory> directive that used to control the directory (or parent directory) you are having problems with.

hamish 11-14-2004 04:25 AM

Hey, thanks for that.

I have put that in the <Directory> part for the directory in which the protected directory lives (ie http://blah.blah.com/~hamish/ )

However, it still doesn't show the protected directory in that folder.

Any other suggestions?
Hamish

david_ross 11-14-2004 10:54 AM

This seems odd. Does it show non protected directories?

hamish 11-14-2004 04:00 PM

Yeah, it shows all the non protected directories. Just not the protected ones.
Is it not an override thing?

hamish

david_ross 11-15-2004 12:50 PM

I have never seen this to be honest. The only reference I can see to anything like it is in the 2.1 docs:
http://httpd.apache.org/docs-2.1/mod....showforbidden


All times are GMT -5. The time now is 03:30 PM.