If you use NGINX as your webserver, there might be certain folders you want to display as a directory listing instead of serving up an HTML page. When I ran NGINX on my server, I noticed that it would truncate the filename to about 50 characters. This was unacceptable for the application I needed it for.
First step is to turn on directory listing in your conf file by setting autoindex on;
The next step is to edit a source file and recompile NGINX.
You’ll want to edit the file located at src/http/modules/ngx_http_autoindex_module.c
.
Change these lines:
#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50
to whatever you want, such as:
#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100
#define NGX_HTTP_AUTOINDEX_NAME_LEN 100
Hey I am so happy I found your site, I really found you
by error, while I was searching on Digg for something
else, Anyhow I am here now and would just like to say
thanks a lot for a marvelous post and a all round interesting blog (I also
love the theme/design), I don’t have time to read through it
all at the moment but I have saved it and also added in your RSS feeds,
so when I have time I will be back to read more, Please do keep up the excellent b.
I’m curious to find out what blog system you’re utilizing? I’m experiencing some small security problems with my latest site and I’d like to find something more safeguarded. Do you have any solutions?|