4

I want to share folder contents over http. I've installed nginx with autoindex on and configured it to my folder. The problem is it takes me html file with file/folder list, but I want some kind of xml with same information.

Is it possible to do it using standard nginx tools, or should I implement some script to solve this problem?

Victor Haydin
  • 3,518
  • 2
  • 26
  • 41

3 Answers3

5

You have to involve some scripting to make it work. Most what you can get with nginx configuration is custom footer and header.

By the way, developers looks forward to adding xml index module to nginx.

Dmitry Verhoturov
  • 5,835
  • 2
  • 32
  • 39
3

Starting from version 1.7.9 you can use:

autoindex on;
autoindex_format xml;

See the docs: http://nginx.org/r/autoindex_format

VBart
  • 14,714
  • 4
  • 45
  • 49
  • Just to clarify - I'm assuming you mean 'version 1.7.9 of the autoindex module'. As of Jan 2015, the latest version of nginx is 1.4.7 – Patrick Jan 23 '15 at 09:48
0

sudo apt install libnginx-mod-http-fancyindex

fancyindex on;

Seandex
  • 111
  • 5