mod-autoindex

Apache directory listing as json

风格不统一 提交于 2019-11-28 12:21:20
Is it possible to have the directory listing in apache return json instead of html? I'm completely unexperienced with Apache, but I've browsed the documentation for IndexOptions and mod_autoindex. It seems like there's no built in way to configure the output. I looked at the code in apache source in modules/generators/mod_autoindex.c and the HTML generation is static. You could rewrite this to output JSON, simply search for all the ap_rputs and ap_rvputs function calls and replace the HTML with the appropriate JSON. That's seems like a lot of work though. I think I would do this instead... In

Apache directory listing as json

£可爱£侵袭症+ 提交于 2019-11-27 06:55:56
问题 Is it possible to have the directory listing in apache return json instead of html? I'm completely unexperienced with Apache, but I've browsed the documentation for IndexOptions and mod_autoindex. It seems like there's no built in way to configure the output. 回答1: I looked at the code in apache source in modules/generators/mod_autoindex.c and the HTML generation is static. You could rewrite this to output JSON, simply search for all the ap_rputs and ap_rvputs function calls and replace the