2

Just a quick question:

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

6

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:

#define NGX_HTTP_AUTOINDEX_NAME_LEN     50

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

  • 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

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.