server { listen 80; server_name download.9981.tech; # 任意IP/域名访问 root /usr/share/nginx/html/download; index index.html; location / { autoindex on; autoindex_exact_size off; autoindex_localtime on; autoindex_format html; add_header Accept-Ranges bytes; expires 1d; add_header Cache-Control "public, max-age=86400"; sendfile on; tcp_nopush on; tcp_nodelay off; # 仅允许下载(禁止上传/修改) limit_except GET HEAD { deny all; } } }