httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] Restricting indexes to authenticated users
Date Tue, 15 Aug 2006 13:22:55 GMT
On 8/15/06, Rich Thomas <> wrote:

> I'm running Server version: Apache/1.3.26 (Unix) and I'm trying to figure
> out how I can allow anonymous access to the files in a directory yet
> restrict the Directory index listing only to a few authenticated users.
> I know I'll probably need to use an .htaccess file with the Options –Index
> on the directory but how do I allow certain users to access the index?

[1.3.26 is rather old; you should upgrade]

I didn't answer this the last time because it isn't really a
fully-defined question.  For example, what do you want to happen when
unauthenticated users access the directory?  Should they be served up
the DirectoryIndex file (index.html)?  If so, you need to find a way
in the URL to differentiate between users who get the index.html and
users who get the directory listing.

Something like this for example:
<Directory /path/to/dir>
Options None
Alias /getlisting /path/to
<Location /getlisting>
Options Indexes
Require valid-user

Then restricted users access and get the
index.html, while people with the right password can access and get the directory listing.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message