location /usr/local/nginx/omappres {
alias /usr/local/nginx/omappres/;
default_type 'application/octet-stream';
add_header Content-disposition "attachment";
}
本文介绍了一种使用Nginx配置静态资源下载的方法,通过设置location块,定义了资源路径别名,并指定了资源类型及下载方式,确保了资源能够被正确地作为附件下载。
location /usr/local/nginx/omappres {
alias /usr/local/nginx/omappres/;
default_type 'application/octet-stream';
add_header Content-disposition "attachment";
}
610
405

被折叠的 条评论
为什么被折叠?