You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Erik Andersson <er...@cybercomgroup.com> on 2004/06/11 13:53:08 UTC

[users@httpd] Directory listing filter

Hi again..

Sorry for the noob questions.. I have tried searching, but it seems I'm
not using the right keywords..

How can I configure so only *.log files will show in a directory?

Best Regards / Erik

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Directory listing filter

Posted by Robert Andersson <ro...@profundis.nu>.
Erik Andersson wrote:
> Sorry for the noob questions.. I have tried searching, but it seems I'm
> not using the right keywords..
>
> How can I configure so only *.log files will show in a directory?

AFAIK, you cannot. You are expecting a lot from a basic a simple module such
as mod_autoindex :)

There are two way which you might be able to get what you want (depending on
what that is):

1) Use IndexIgnore if the files you don't want displayed are known.
   Note that just because they aren't listed, it doesn't mean they cannot be
   requested. So you are only obscuring the existance of the files, you do
   not protect them.

2) Should work in Apache 2. Deny access to all files except *.log files.
   mod_autoindex (for Apache 2) will make an internal subrequest on
   each file to see if it is accessible, and only display those that are.
This
   will also protect the unlisted files.

3) Ok, a third way. Write your own index in something like PHP. You
   then have complete control on how it looks and functions.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org