映射文件夹的位置需要这样写:(注意文件夹路径的写法,最后一个 “/” 需要带上)
location / {
alias D:/nginx/fs/;
allow all;
autoindex on;
}
具体配置如下图:

文件页面展示效果:

本文详细介绍了如何在Nginx中配置文件夹路径,包括location块的使用,如alias指令设置D:/nginx/fs/,并讨论了allowall、autoindexon等选项。展示了实际配置示例及文件页面展示效果。
映射文件夹的位置需要这样写:(注意文件夹路径的写法,最后一个 “/” 需要带上)
location / {
alias D:/nginx/fs/;
allow all;
autoindex on;
}
具体配置如下图:

文件页面展示效果:

8088
6026
7863
625

被折叠的 条评论
为什么被折叠?