I have a nginx server setup and everything is working fine. I have a
virtual server setup which allows directory listing (autoindex on;).
It appears to truncate the file names at around 50 characters.
Is it possible to disable this so that it will show the entire filename?
Or is there a way to increase it to say 100 or 150 characters?
Thanks!
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,124400,124400#msg-124400
I looked all over the net and wasn’t able to find this answer anyway, so
I looked into the nginx source files and it’s very easy.
Simply modify the file located at
src/http/modules/ngx_http_autoindex_module.c and then compile.
Change these lines:
[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50[/b]
to whatever you want, such as:
[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100
#define NGX_HTTP_AUTOINDEX_NAME_LEN 100[/b]
And then compile and restart nginx. That’s it !!!
Posted at Nginx Forum: