vim /var/www/html/index.php 在其中添加以下内容#
<?php
phpinfo();
?>
phpinfo();
?>
# 保存退出
用浏览器打开
Forbidden
You don't have permission to access /index.php on this server.
我以为配置出错,PHP包全都安装了可是还是出错,最后发现还是权限问题
You don't have permission to access /index.php on this server.
我以为配置出错,PHP包全都安装了可是还是出错,最后发现还是权限问题
(万恶的权限,我都没用ubuntu系统,用的centos系统root账户)
原因:index.php是用root用户建的文件, apache权限不够。 (可恶以后要注意权限)
解决方法:更改文件权限;chmod 777 index.php
原因:index.php是用root用户建的文件, apache权限不够。 (可恶以后要注意权限)
解决方法:更改文件权限;chmod 777 index.php
转载于:https://blog.51cto.com/80888888/1333291