nginx: 添加文件下载目录

修改nginx.conf,添加如下行:

location /file/ {
    alias /usr/share/nginx/html/file/;
    add_header Content-disposition "attachment";
}

posted @ 2017-07-12 15:44  GreatK  阅读(2760)  评论(0编辑  收藏  举报