# 把以下配置放到 server {} 块.
#关闭favicon.ico不存在时记录日志 location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { allow all; log_not_found off; access_log off; }
# 不允许访问隐藏文件例如 .htaccess, .htpasswd, .DS_Store (Mac). location ~ /. { deny all; access_log off; log_not_found off; }