Browse Source

updated docs to 1.4.x names and add support for global index-generators (see #250)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@762 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.6
Jan Kneschke 16 years ago
parent
commit
1377748235
  1. 9
      doc/configuration.txt
  2. 8
      src/mod_indexfile.c

9
doc/configuration.txt

@ -210,7 +210,7 @@ server.groupname
NOTE: requires root-permissions
server.dir-listing
dir-listing.activate
enables virtual directory listings if a directory is requested no
index-file was found
@ -232,13 +232,16 @@ server.follow-symlink
Default: enabled
server.indexfiles
index-file.names
list of files to search for if a directory is requested
e.g.: ::
server.indexfiles = ( "index.php", "index.html",
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
if a name starts with slash this file will be used a index generator
for all directories.
server.modules
modules to load

8
src/mod_indexfile.c

@ -154,7 +154,13 @@ URIHANDLER_FUNC(mod_indexfile_subrequest) {
for (k = 0; k < p->conf.indexfiles->used; k++) {
data_string *ds = (data_string *)p->conf.indexfiles->data[k];
buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
if (ds->value && ds->value->ptr[0] == '/') {
/* if the index-file starts with a prefix as use this file as
* index-generator */
buffer_copy_string_buffer(p->tmp_buf, con->physical.doc_root);
} else {
buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
}
buffer_append_string_buffer(p->tmp_buf, ds->value);
if (HANDLER_ERROR == stat_cache_get_entry(srv, con, p->tmp_buf, &sce)) {

Loading…
Cancel
Save