解决apache访问php文件时直接下载文件问题
环境说明:
linux:centos7.3
apache: Apache/2.4.6 (CentOS)
php :PHP 7.3.3
一、下载安装依赖包
1.下载安装: rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
2.mod_php71w安装:
yum install mod_php71w
二、配置apache的httpd.conf文件
配置完后需要重启apache:systemctl restart httpd.service