zoukankan      html  css  js  c++  java
  • centos搭建好了lamp,能访问.html文件,无法访问.php文件

    centos搭建好了lamp,无法访问.php文件,能访问.html文件

    我是安装好redis扩展后,重启了服务器,结果就不能访问.php文件了

    若是重启服务器后无法访问,这种情况请直接关闭防火墙,然后刷新浏览器。具体方法在最下面给出

    解决方法:

    1、检查Apache,php和Mariadb服务是否正常运行

    1.1、检查Apache服务

    systemctl status httpd.service

    看到   Active: active (running)  就说明运行正常。

    否则开启Apache服务

    systemctl enable httpd && systemctl start httpd  //开启服务,并设置开机启动

    1.2检查php是否在运行

    ps -ef | grep php

    看到

    root 4411 3967 0 22:30 pts/1 00:00:00 grep --color=auto php

    就说明正常运行

    1.3检查Mariadb服务

    systemctl status mariadb.service

    看到   Active: active (running)  就说明运行正常。

    否则开启Mariadb服务

    systemctl enable mariadb && systemctl start mariadb  //开启服务,并设置开机启动

    2、若以上环境都正常,请尝试关闭防火墙

    执行下面命令:

    
    
    systemctl stop firewalld.service
  • 相关阅读:
    微信小程序使用wxParse解析html
    git基本操作
    thinkphp 静态缓存设置
    phpstudy 安装memcached服务和memcache扩展
    CSS超出部分显示省略号…代码
    小程序支付
    phpstorm 快捷键2
    thinkphp session设置
    cookie与session
    微信小程序 setData动态设置数组中的数据
  • 原文地址:https://www.cnblogs.com/zqblog1314/p/13263772.html
Copyright © 2011-2022 走看看