让nginx可以以列表形式显示目录文件
1、编辑/etc/nginx/nginx.conf,让nginx可以以列表形式显示目录文件。
location / {
root /mnt/software; #我们需要显示的目录
autoindex on; #以列表信息显示目录文件
index index.html index.htm;
charset utf-8;
}
2、修改了nginx的配置文件,重新加载一下nginx。
nginx -s reload

浙公网安备 33010602011771号