title: make Apache2 serve directory index in json
body: <p>When enabled and privileged, the <a href="http://httpd.apache.org/docs/2.0/mod/mod_dir.html" rel="nofollow">mod_dir</a> module in Apache2 automatically serves a HTML formatted page with the contents of a directory when a directory is requested which does not contain an index.html file. I am looking for an easy way to make these directory contents machine readable; Preferebly have the contents of the directory formatted as a JSON array containing the subdirs/subfiles instead of an HTML page.</p>
  
  <p>What would be a an easy way to accomplish this, that works on most standard configurations of Apache2.2? (no php scripts please)</p>