
更改nginx.conf
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
autoindex on;
}
本文详细介绍了Nginx配置文件nginx.conf中location块的具体设置,包括root目录的指定、默认索引文件、uri请求路径匹配、自动索引开启等功能,为网站服务器的高效稳定运行提供配置指导。

更改nginx.conf
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
autoindex on;
}
1693