Giter Club home page Giter Club logo

nginx-pretty-index's Introduction

nginx-pretty-index

XSLT styles for Nginx AutoIndex Pages

pretty nginx autoindex

Installation

  • install nginx

  • install ngx_http_xslt_module. on Ubuntu, it's named as nginx-module-xslt

  • load modules in nginx.conf

    load_module modules/ngx_http_xslt_filter_module.so;
    
  • download styles.xslt

  • modify server blocks as required. here's a snippet for your reference

    server {
      ......
      ......
    
      location / {
        try_files $uri @autoindex;
      }
    
      location @autoindex {
        autoindex on;
        autoindex_exact_size off;
        autoindex_format xml;
    
        xslt_string_param path $uri;
        xslt_stylesheet path/to/styles.xslt;
      }
    
      ......
      ......
    
    }
    
  • check nginx syntax (sudo nginx -t) and restart nginx process

Features

  1. Beautiful Colors (borrowed from Keith Knittel - CSSTricks)
  2. Responsive Page - Mobile users can browse through files easily
  3. Filter files by name
  4. Icons - File and Folder icons

Credits

This work is based upon dirlist.xslt by Moritz Wilhelmy

nginx-pretty-index's People

Contributors

abdus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nginx-pretty-index's Issues

Error: cannot parse styles.xslt

I tried doing exactly as you say, and i get the following error

xsltParseStylesheetFile : cannot parse /usr/share/nginx/html/styles.xslt
nginx: [error] xsltParseStylesheetFile("/usr/share/nginx/html/styles.xslt") failed in /etc/nginx/conf.d/reverse-proxy.conf:110
nginx: configuration file /etc/nginx/nginx.conf test failed

What's even weirder is, I managed to make some other themes based on wslt work (and that's especially true for the one which this one is based on).
I attached the whole output of sudo nginx -t to this issue. Will keep it updated if I manage to fix anything but myself, but I'm really not sure where to even beggin.
report.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.