Just a quick question:

How can I prevent nginx from trimming file name with ... in listing directory?


It looks like the only way to that is to edit the source code. The following #define in src/http/modules/ngx_http_autoindex_module.c have to be changed:


Maybe something else needs to be tweaked too, but that's what I saw at first glance.

| improve this answer | |
  • This could be time consuming. You sure there is no other way around this? If not I could start write a small php script. – DucDigital Sep 12 '11 at 16:27
  • 1
    There's no other way, maximal length is hard-coded with the #define above. Yep, external script for directory listing may be a better solution. – Vladimir Blaskov Sep 12 '11 at 16:32

i use Fancy Index module (ubuntu: libnginx-mod-http-fancyindex) and specify simple file with this js snippet.

location / {
    fancyindex on;
    fancyindex_footer footer.html;
    fancyindex_ignore footer.html;

<!-- footer.html in the folder -->
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
$("a").each(function() {

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.