You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Precourt <da...@comcast.net> on 2004/03/23 17:07:02 UTC

[users@httpd] How to override authorization in a subdirectory?

Hello,

 

I'm sure there is a very simple solution to this problem, but please bear
with me; I am new to using Apache.

 

I'm setting up an HTTP server using Apache 2.0. Here's the problem,
http://danidentity.no-ip.info is the root of my server. I want to password
protect everything below that, except one directory. I've set up aliases so
I can do things like http://danidentity.no-ip.info/c, and
http://danidentity.no-ip.info/d to browse listings of my C and D drives,
respectively. However, there is one directory on drive D that I don't want
to password protect, so I can quickly drop files in there and have people be
able to access them from the outside. If I set up authorization for drive D,
all the subdirectories inherit that authorization. Is there a way to
override the authorization for one directory on drive D, yet keep it for
everything else?

 

I tried using an .htaccess file and couldn't get it working. I setup a
directory section for the directory I don't want password protected, like
so:

<Directory "D:/pubfiles ">
    AllowOverride All
</Directory>

Now what would I put in my .htaccess file in D:/pubfiles to override the
authorization I have setup for D:/ ? Doesn't seem like you can do something
like AuthType None, and if I leave out the authorization stuff in the
.htaccess file, it still prompts for a user/pass when trying to access the
directory.

 

Thank you for your help.

Dan