Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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>
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.