1,首先查看/etc/http/modules/中是否有libphp5.so(为什么是5默认安装php5)
2,如果1有还是不行就/etc/http/conf/http.conf中的
DirectoryIndex index.html
index.php 添加index.php…
还不行的话则在
AddType application/x-gzip .gz .tgz
下方添加
AppType application/x-httpd-php .php
重启apache
3如果1没有
yum -y install mod_php
重启
3.1重启之后还不行
执行2操作
解决centos7下apache无法解析php
最新推荐文章于 2022-08-11 17:55:24 发布