社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
废话不多说,直接上代码
// An highlighted block
server {
listen 80;
server_name localhost;
charset utf-8;
location /download {
alias /opt/data;
autoindex on; # 索引
autoindex_exact_size on; # 显示文件大小
autoindex_localtime on; # 显示文件时间
}
}
其中最主要的就是
location /download {
alias /opt/data;
autoindex on; # 索引
autoindex_exact_size on; # 显示文件大小
autoindex_localtime on; # 显示文件时间
}
访问连接:http://10.18.135.210/download/
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!