Fancyindex

From XPUB & Lens-Based wiki
Revision as of 19:03, 13 September 2019 by )biyibiyibiyi( (talk | contribs)

what is FancyIndex?

The Fancy Index module makes possible the generation of file listings, like the built-in autoindex module does. It provides more potentials than autoindex module which also generates file listing, but possible to alternate CSS qualities of the page. Such as:

  1. custom headers
  2. custom footers
  3. own css stylesheet
  4. Allow choosing to sort elements by name (default), modification time, or size; both ascending (default), or descending (new in 0.3.3). (which I haven't tried out, yet. what is this function?)

implementation

  1. install nginx on server, I am running a raspberry pi server with Raspian lite.
  2. download and install package nginx extras with following command
     sudo apt-get install nginx-extras 
  3. after download, edit with text editor the following nginx configuration file in
     /etc/nginx/sites-available/default 
    with following configurations.
  4. in server directive, find a directive named location, add the FancyIndex configuration:
location / { fancyindex on; # Enable fancy indexes.
fancyindex_exact_size off;  # Output human-readable file sizes.
} 

afterwards restart nginx by entering

 sudo service nginx restart 

check if the configuration file is updated correctly by entering if nginx fails to restart.

 systemctl status nginx.service