LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ANNOUNCE: Bootstrap-based directory indexes for nginx (https://www.linuxquestions.org/questions/slackware-14/announce-bootstrap-based-directory-indexes-for-nginx-4175611720/)

dugan 08-10-2017 09:38 PM

ANNOUNCE: Bootstrap-based directory indexes for nginx
 
Can't remember if I'd announced this before. Anyway, here's a useful project that I did a few years ago, that works well on Slackware:

https://github.com/duganchen/ngx-responsiveindex

Clone it, and then build nginx from the SBo SlackBuild with:

Code:

ADDMODULE=/path/to/ngx-responsiveindex ./nginx.SlackBuild
And then in nginx.conf, replace

Code:

autoindex
with

Code:

responsiveindex
Now your directory indexes will be a table if you have a wide screen, and a list if you have a narrow screen.

For example, here's a block to serve up user-directories at ~/www:

Code:

location ~ ^/~(.+?)(/.*)?$ {
    alias /home/$1/www$2;
    responsiveindex on;
    responsiveindex_exact_size off;
}



All times are GMT -5. The time now is 04:24 PM.