dir-listing vs. index-file
|Missing in 1.5.x:|
I don't know if this is a documentation "bug", or a real bug -- I'm not sure what the true intent of the feature interaction is now.
According to the docs (i.e. those distributed with the version I'm running, i.e. 1.4.20):
"A directory listing is generated if a directory is requested and no index-file
was found in that directory."
However it seems to me that dir-listing takes precedence over index-file as whenever I turn on dir-listing.activate I always get directory listings even when any (or all!) of the index-file.names files are present in the requested directory.
I think if for nothing else than compatibility with Apache this is actually a code bug -- i.e. the docs should be right.
(Note I'm running a fully static-linked lighttpd built with -DLIGHTTPD_STATIC.)
#2 Updated by woods over 4 years ago
if module loading order is important in this issue, then I would say that's a very serious bug!
I find it amazing that I have to point out that mod_dirlisting and mod_indexfile are always pre-loaded.
So, this problem should occur for dynamic-linked versions too since it is impossible to dynamically load them, especially in any different order.
From the server-config page the "loaded modules" table shows:
If this is the order they are "loaded" in (instead of what appears to be an alphabetically sorted output list) then it would seem as if the build system ignores the documented constraints for module loading order. Sigh. This kind of bug should be easily caught in early simple testing.
(BTW, static-linking is a necessary feature for many secure and embedded environments -- not fully supporting it also a serious bug in my estimation.)
#3 Updated by woods over 4 years ago
At the moment the following manually generated "src/plugin-static.h" file seems to do the trick, though I've nowhere near tested all functionality yet -- just the minimum my site requires. #ifdefs are not used for PCRE or libz because my pkgsrc module requires those as non-optional dependencies. The opening comment is of course from the (inadequate, IMO) docs.
* The modules are executed in the order as they are specified. Loading
* mod_auth AFTER mod_fastcgi might disable authentication for fastcgi
* backends (if check-local is disabled).
* As auth should be done first, move it before all executing modules (like
* proxy, fastcgi, scgi and cgi).
* rewrites, redirects and access should be first, followed by auth and
* the docroot plugins.
* Afterwards the external handlers like fastcgi, cgi, scgi and proxy and
* at the bottom the post-processing plugins like mod_accesslog.
PLUGIN_INIT(mod_rewrite) /* PCRE /
PLUGIN_INIT(mod_redirect) / PCRE */
PLUGIN_INIT(mod_auth) /* CRYPT LDAP LBER */
PLUGIN_INIT(mod_magnet) /* LUA */
* indexfile must come before dirlisting for dirlisting not to override
PLUGIN_INIT(mod_mysql_vhost) /* MySQL */
PLUGIN_INIT(mod_ssi) /* PCRE */
* staticfile must come after cgi/ssi/et al.
PLUGIN_INIT(mod_cml) /* MEMCACHE LUA LUALIB */
PLUGIN_INIT(mod_trigger_b4_dl) /* PCRE */
PLUGIN_INIT(mod_webdav) /* XML2 SQLITE3 UUID */
* post-processing modules
PLUGIN_INIT(mod_compress) / Z BZ2 */
Also available in: Atom