vim /usr/local/nginx/conf/nginx.conf: 在 location /{ index index.php index.html index.htm //添加了一个 index.php 【保存,重读配置即可。再次 url 只访问目录就会尝试去找 index.php】 }