CentOs+ngnix访问PHP文件时常出现的问题

1、Access denied.

出现这个问题在于你的php.ini中的open_basedir设置了限制,只需要把open_basedir的访问路径更改为网站所在的绝对路径,就可解决了

open_basedir=/home/wwwroot/:/tmp/    #此处更改为你本机的默认网站目录即可解决

2、No such file: No such file or directory

出现这个问题,在于你没有修改配置文件php.ini中的open_basedir选项所致,找到改为本机网站地址即可

你可能感兴趣的:(nginx,centos)