Skip to content

Latest commit

 

History

History
41 lines (37 loc) · 1.75 KB

README.md

File metadata and controls

41 lines (37 loc) · 1.75 KB

Contains two separate projects

  • Autoindex write in PHP.

    copy .DirTrees/ and index.php into FOLDER.
    .

  • Nginx custom autoindex with XSLT.

use ngx_http_autoindex_module module.

location ^~ /bt/ {
   autoindex on;
   autoindex_format html;
   #autoindex_localtime off;
   charset utf-8;
   include /etc/nginx/default.d/php71w-fpm.conf;
}

.

use ngx_http_autoindex_module module.
use ngx_http_xslt_module module.
ngx_http_xslt_module support by libexslt. So it can use EXSLT functions.

location ^~ /bt/ {
   autoindex on;
   autoindex_format xml;
   xslt_stylesheet /data/www/html/autoindex.xslt cpath="$uri";
   #charset utf-8;
   include /etc/nginx/default.d/php71w-fpm.conf;
}

# modify variable "TIMEDIFF" in "autoindex.xslt", 
# time nochange 'PT0H', +8 hour='PT8H', -6 hour='-PT6H'.

.
File modification time is UTC time. Because only UTC time is provided in the XML file.
You can modify variable "TIMEDIFF" to change display of modify time.