# 新增location块来限制特定目录的访问 location /Download/ { autoindex off; # 禁止目录列表 if ($request_filename ~* \.(txt|pdf|doc|docx|xls|xlsx|ppt ...