nginx搭建简易文件下载服务器

准备一个解压好的nginx

进入conf文件夹编辑nginx.conf文件

找到
location / {
            root   html;
            index  index.html index.htm;
}

location / {
            root   /;     #/表示nginx所在盘符的根目录,可以根据具体被下载文件实际路径修改
            autoindex on;
}

启动ngxin
浏览器访问即可下载文件

评论

暂无评论