httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Parke <>
Subject Re: [users@httpd] undocumented silent failure of mod_autoindex (without mod_dir)
Date Sun, 06 Sep 2015 01:29:06 GMT
On Sat, Sep 5, 2015 at 4:26 PM, Eric Covener <> wrote:
> On Sat, Sep 5, 2015 at 7:06 PM, Parke <> wrote:
>> Undocumented, silent failures can be frustrating to diagnose.
>> Perhaps the mod_autoindex documentation could be improved to include:
>> 1) an explicit explanation of mod_autoindex's dependency on mod_dir
>> and DirectoryIndex
>> 2) a sample, minimal, functioning configuration of mod_autoindex
> I think you're mis-observing something here.  The relationship is
> exactly the intiutitive relationship as its described at the top of
> mod_autoindex:
> Summary
> The index of a directory can come from one of two sources:
> * A file written by the user, typically called index.html. The
> DirectoryIndex directive sets the name of this file. This is
> controlled by mod_dir.

> * Otherwise, a listing generated by the server. The other directives
> control the format of this listing. The AddIcon, AddIconByEncoding and
> AddIconByType are used to set a list of icons to display for various
> file types; for each file listed, the first icon listed that matches
> the file is displayed. These are controlled by mod_autoindex.

It is not intuitive to me that "Otherwise" means "if (and only if)
both mod_dir is loaded and no DirectoryIndex is found".

I read "Otherwise" as meaning "if the index does not come from
mod_dir".  In my case, there were at least two good reason to believe
that the index would not come from "mod_dir".  (1) mod_dir was not
loaded.  (2) there was no "index.html" file in the requested

> mod_autoindex works without mod_dir loaded and works with mod_dir
> loaded as when you request a directory that doesn't have one of the
> named DirectoryIndex files. If it's failing for you, it's something
> more nuanced (like some other directives changing where the request is
> mapped to)

I did some more testing, and it turns out that I was partly incorrect.
Setting DirectoryIndex to disabled has no effect.  However, I still
need to load mod_dir before I get indexes from mod_autoindex.

If there are nuances in my configuration file that are causing
mod_autoindex to silently fail, I'd be happy to know what those
nuances are.

Here is the relevant configuration file in its entirety.


ServerName              localhost
DocumentRoot            /tmp
Listen                  8005

ErrorLog                /tmp/error
PidFile                 /tmp/pid

###  core apache 2.4
LoadModule  authn_core_module   /usr/lib/apache2/modules/
LoadModule  authz_core_module   /usr/lib/apache2/modules/
LoadModule  mpm_prefork_module  /usr/lib/apache2/modules/

###  auto index
LoadModule  autoindex_module    /usr/lib/apache2/modules/
Options                 +Indexes
IndexOptions            FancyIndexing

# uncomment the next line to actiavte mod_autoindex
# LoadModule  dir_module          /usr/lib/apache2/modules/


I am running on Ubuntu 14.04, with apache2 package version
2.4.7-1ubuntu4.5.  I am running apache2 as non-root.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message