php不解析的排查步驟

php不解析的排查步驟:
1. /usr/local/apache2/bin/apachectl -M 看一下有沒有加載libphp5.so
2. 查看配置文件中是否有
AddType application/x-httpd-php .php
3. 看看有沒有加入indexphp

DirectoryIndex index.html index.htm index.phphtml

4. 不要忘記重啓apache
5. 還有一個不容忽視的問題,就是檢查你的selinux是否開啓
命令: getenforce 若是結果是 Enforcing 就說明是打開的
關閉: setenforce 0
還要在配置文件中配置一下 vi /etc/selinux/config 把enforcing改成disabledlinux

在測試的時候,能夠在你的linux本機上測試 curl localhost/phpinfo.php -I 看下狀態碼,看是不是200apache

相關文章
相關標籤/搜索