-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index files not working #46
Comments
For me I think this was still OK in 1.9.15 and not working in 1.10.1. |
It seems that I will need to find out in which version of Nginx things stopped working. One question: are you using fancyindex as a loadable dynamic module, or built into Nginx statically? |
Statically |
Statically also. I've checked, 1.9.15 was OK. 1.9.15 was with Fancy Index 0.3.6 |
Was about to report this. FI 0.4.0 (static) with 1.10.1 ignores index.html here, as well. |
Thanks for all the comments. I'll check the changes introduced by Nginx and try to fix this issue as soon as I'm back from holidays later this week. Sorry for keeping you waiting! |
I have just started adding a test suite for the module (see #47), and I am now going to add a couple of test cases which reproduce this issue. It was about time to have tests 😉 |
Okay, I have an explanation for this: in versions after # XXX: Insert fancyindex module *after* index module!
#
HTTP_MODULES=`echo "${HTTP_MODULES}" | sed -e \
's/ngx_http_index_module/ngx_http_fancyindex_module ngx_http_index_module/'` That is because after ngx_module_order="$ngx_module_name
ngx_http_autoindex_module" That causes the correct module order to be used when loading the module dynamically. Unfortunately for static builds the |
It seems that using the old-style if [ $ngx_module_link = DYNAMIC ] ; then
# Define $ngx_module_order and source auto/module
else
# Manually edit $HTTP_MODULES and $NGX_ADDON_SRCS
fi Soon I will be pushing a fix for this issue 😄 |
For static builds we still need to manually reorder $HTTP_MODULES, and we cannot source "auto/module" like the new-style configuration mode needs, because the "auto/module" snippet modifies $HTTP_MODULES itself, but ignores the new $ngx_module_order variable when doing a static build. Fortunately, the old-style way of configuring the module is still working in all Nginx versions for statically built modules, so we can keep using that for static builds. This fixes issue #46.
For static builds we still need to manually reorder $HTTP_MODULES, and we cannot source "auto/module" like the new-style configuration mode needs, because the "auto/module" snippet modifies $HTTP_MODULES itself, but ignores the new $ngx_module_order variable when doing a static build. Fortunately, the old-style way of configuring the module is still working in all Nginx versions for statically built modules, so we can keep using that for static builds. This fixes issue #46.
The fix is now in |
The index file seems to be ignored with nginx 1.11.2 if fancyindex is enabled. If I recall correctly, the module used to work like a drop-in replacement for autoindex and respected the index files.
The text was updated successfully, but these errors were encountered: