Full Filename Directory Listing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Full Filename Directory Listing

vedranf
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


_______________________________________________
nginx mailing list
[hidden email]
http://nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Full Filename Directory Listing

vedranf
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
[b]src/http/modules/ngx_http_autoindex_module.c[/b] 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: http://forum.nginx.org/read.php?2,124400,167420#msg-167420


_______________________________________________
nginx mailing list
[hidden email]
http://nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Full Filename Directory Listing

j94305
Sincere and real appreciation fagtron

Can you find us a tip to edit src / http / modules /
ngx_http_autoindex_module.c

so you do not have columns dating and size?

And only the file name?

Whether your summer you be good!

tungstone

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,124400,269038#msg-269038

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Full Filename Directory Listing

j94305
Example:
1.cd /usr/local/nginx-1.16.1/src/thhp/modules
2.vi ngx_http_autoindex_module.c
3.cd /usr/local/nginx-1.16.1
4.make
5.make install

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,124400,286011#msg-286011

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx