vim /usr/local/nginx/conf/nginx.conf:
在 location /{
在 location /{
index index.php index.html index.htm //添加了一个 index.php 【保存,重读配置即可。再次 url 只访问目录就会尝试去找 index.php】
}
本文介绍了如何在Nginx的配置文件中添加index.php作为默认索引文件之一,通过简单修改实现当用户访问目录时优先尝试加载index.php。
6858
4365
442

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