Home  >  Article  >  Backend Development  >  为什么我的centos搭建好的php环境,新建了虚拟网站,可以访问html,不能访问php?

为什么我的centos搭建好的php环境,新建了虚拟网站,可以访问html,不能访问php?

WBOY
WBOYOriginal
2016-06-06 20:17:221528browse

1,php环境正确,
2,虚拟机可以访问html文件,
3,虚拟机不可以访问index.php,错误代码500!!

回复内容:

1,php环境正确,
2,虚拟机可以访问html文件,
3,虚拟机不可以访问index.php,错误代码500!!

500 属于服务器内部错误

这种情况,你需要检查一下是不是访问到你的PHP 脚本了。然后检查下你的PHP 脚本有没有语法错误。注意查看你的nginx log

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn