Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Nginx optimization for WebDAV access from OS X Finder. This config snippet ensures that nginx will ignore requests for useless dot files generated by the Finder (.DS_Store, ._*, …)
# Ignore requests for useless dot files generated by OS X Finder (WebDAV).
# This little hack speeds-up a WebDAV access from the Finder significantly and
# also prevents messing storage with these annoying files.
location ~ \.(_.*|DS_Store|Spotlight-V100|TemporaryItems|Trashes|hidden)$ {
access_log off;
error_log off;
if ($request_method = PUT) {
return 403;
return 404;
location ~ \.metadata_never_index$ {
return 200 "Don't index this drive, Finder!";

This comment has been minimized.

Copy link

RaphaelWimmer commented Jul 21, 2015

Thanks, just what I needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.