Make Apache2 a directory pointer in json

When it is enabled and privileged, the mod_dir module in Apache2 automatically sends an HTML page with the contents of the directory when the directory does not contain the index.html file. I am looking for an easy way to make this directory contents readable; It is preferable to have the contents of a directory formatted as a JSON array containing subdirs / subfiles instead of an HTML page.

What would be an easy way to accomplish this, which works on most standard Apache2.2 configurations? (without php scripts)

+6
source share
1 answer

What would be an easy way to accomplish this, that would work on most standard Apache2.2 configurations?

Not. You need to either modify or rebuild mod_autoindex, or you will need to redirect to a script file or generated JSON on the server.

+1
source

Source: https://habr.com/ru/post/913644/


All Articles