apache config: like mod_dir.so, but a Perl script

I know about the DirectoryIndex statment ...
Code:
DirectoryIndex index.cgi index.html
... and that works fine for me (with index.cgi being a Perl script). But if, for a given directory, neither index.cgi nor index.html exists, I don't want to run libexec/apache24/mod_dir.so; I want to run a particular Perl script, and not have to place it (or a pointer to it) in each directory. How do I tell the apache config file that I want to fall back to an arbitrary Perl script if DirectoryIndex doesn't find one of the listed files in a particular directory?
 
Bingo. What I'm trying for is something that displays in the style of Norton Commander / Midnight Commander: the desired directory is on the right, its parent directory is on the left, and you can click on file entries in either frame. The format is similar to the output from ls -l. Proof of concept, which seems to run pretty well, is here.
 
Back
Top