Nginx配置之文件下载

server {
listen 8082;
server_name localhost;

location /download/ {
alias /usr/share/nginx/psbcubankout-dev;

sendfile on; # 开启高效文件传输模式
autoindex on; # 开启目录文件列表
autoindex_exact_size on; # 显示出文件的确切大小,单位是bytes
autoindex_localtime on; # 显示的文件时间为文件的服务器时间
charset utf-8,gbk; # 避免中文乱码
}
}

posted @ 2023-07-10 10:38  taotaozh  阅读(175)  评论(0)    收藏  举报