当前位置:主页 > >

nginx设置可以默认访问index.php

时间:2020-06-16 14:14:40 | 栏目: | 点击:

nginx配置好php环境后,访问却报403错误,原来是没有设置默认访问index.php,设置好默认的页面就好了。

vim /usr/local/nginx/conf/nginx.conf

在location下加入index节点:

location / {
	root /www/codeinn_web/;
	index index.php index.html index.htm;
}
重启nginx即可。

您可能感兴趣的文章:

相关文章