Victor Haydin
Victor Haydin

Reputation: 3548

Change nginx autoindex output format

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?

Upvotes: 4

Views: 11720

Answers (3)

Seandex
Seandex

Reputation: 129

sudo apt install libnginx-mod-http-fancyindex

fancyindex on;

Upvotes: -1

VBart
VBart

Reputation: 15110

Starting from version 1.7.9 you can use:

autoindex on;
autoindex_format xml;

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

Upvotes: 3

Dmitry Verhoturov
Dmitry Verhoturov

Reputation: 6082

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.

Upvotes: 5

Related Questions