From fdce427a5c998085019961ff69d4a637e1cd593f Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Sun, 9 Aug 2015 14:00:00 +0300 Subject: [PATCH] README: Mention the need for ngx_http_addition_module The fancyindex_footer and fancyindex_header settings need the standard Nginx ngx_http_addition_module built into Nginx. Add a note to this effect in the README. Also, a warning is issued at configuration time if the addition module is not enabled in the configuration. Closes issue #26. --- README.rst | 13 ++++++++++++- config | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fd9f775..b33de59 100644 --- a/README.rst +++ b/README.rst @@ -31,6 +31,10 @@ series onwards will work. Note that the modules *might* compile with versions in the 0.6 series by applying ``nginx-0.6-support.patch``, but this is unsupported (YMMV). +In order to use the fancyindex_header_ and fancyindex_footer_ directives +you will also need the `ngx_http_addition_module `_ +built into Nginx. + Building ======== @@ -49,7 +53,8 @@ Building of the fancy indexing module:: $ cd nginx-?.?.? - $ ./configure --add-module=../nginx-fancyindex-?.?.? [extra desired options] + $ ./configure --add-module=../nginx-fancyindex-?.?.? \ + [--with-http_addition_module] [extra desired options] 4. Build and install the software:: @@ -141,6 +146,9 @@ fancyindex_footer If set to an empty string, the default footer supplied by the module will be sent. +.. note:: Using this directive needs the ngx_http_addition_module_ built + into Nginx. + .. warning:: When inserting custom header/footer a subrequest will be issued so potentially any URL can be used as source for them. Although it will work with external URLs, only using internal ones is supported. @@ -159,6 +167,9 @@ fancyindex_header If set to an empty string, the default header supplied by the module will be sent. +.. note:: Using this directive needs the ngx_http_addition_module_ built + into Nginx. + fancyindex_ignore ~~~~~~~~~~~~~~~~~ :Syntax: *fancyindex_ignore string1 [string2 [... stringN]]* diff --git a/config b/config index 0430ed8..9a2a416 100644 --- a/config +++ b/config @@ -6,3 +6,7 @@ ngx_addon_name=ngx_http_fancyindex_module HTTP_MODULES=`echo "${HTTP_MODULES}" | sed -e \ 's/ngx_http_index_module/ngx_http_fancyindex_module ngx_http_index_module/'` NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_fancyindex_module.c" + +if [ $HTTP_ADDITION != YES ] ; then + echo " - The 'addition' filter is needed for fancyindex_{header,footer}, but it was disabled" +fi