3

I use Apache 2.2 as WebDAV file server to a bunch of Mac and MS Windows clients. Unfortunately both clutter the filesystem with files like .DS_Store or thumbs.db.

Since hte files distract my users i want to hide them from directory listings. Unfortunately the standard way of hiding files in Apache (via IndexIgnore) seems not to work via WebDAV.

Is there any other way to hide files?

max
  • 301
  • 2
  • 7

2 Answers2

1

Add this to your apache config file below the DocumentRoot directive.

<FilesMatch '^\.[Dd][Ss]_[Ss]'>
Order allow,deny
Deny from all
</FilesMatch>

<FilesMatch '\.[Dd][Bb]'>
Order allow,deny
Deny from all
</FilesMatch>
Sam Cogan
  • 38,736
  • 6
  • 78
  • 114
djdicbob
  • 31
  • 2
-1

Apache can style the very simplistic display of SVN repositories with svnindex.xsl/svnindex.css (http://code.google.com/p/tortoisesvn/source/browse/trunk/contrib/svnindex/ is as good a source as any). Dump those in the web accessable root directory, and you will at least get pretty output.

XSLT isn't exactly an easy language, but I'm sure you can skip patterns, and just not print out what you don't want. Alternatively, I suppose you can just add javascript, which rewrites the page content after the XSLT is finished.

Jeff Warnica
  • 474
  • 2
  • 8
  • This is not useful, since the OP is talking about the WebDAV clients in both operating systems (not the HTML view generated by Apache) – parasietje Nov 03 '14 at 13:20