宝塔nginx配置允许各种文件的下载
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|pdf|doc|docx|xls|xlsx|rar|zip|gz|7z|ppt|pptx|mp3|mp4|avi|mov|wmv)$ { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; add_header Access-Control-Expose-Headers 'Content-Disposition'; expires 30d; error_log /dev/null; access_log /dev/null; }
在网站的配置文件中,修改原先类似的部分为上面的内容