Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing sorting on Nginx autoindex

Tags:

nginx

I am using autoindex with nginx for a specific endpoint that lists a bunch of folders. Is it possible to change the sorting direction from alphabetical to by modified date?

like image 693
K2xL Avatar asked Oct 31 '22 02:10

K2xL


1 Answers

Not without rewriting the module. You can use a PHP script to display whatever you like, or run a task which creates a html page. Or even use Lua to create this for you and check if something has changed, then either display from cache or re-generate.

like image 169
itpp13 Avatar answered Nov 15 '22 06:11

itpp13