centos系统apache支持php配置
1、yum安装apache和php
yum install httpd php -y
2、vim /etc/httpd/conf/httpd.conf
Listen 0.0.0.0:80
ServerName 0.0.0.0:80
DocumentRoot “/var/www/html”
<Directory “/var/www/html”>
DirectoryIndex index.php index.html
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps3、systemctl start httpd
3、setsebool -P httpd_unified 1
给selinux写入权限
4、systemctl stop firewalld
5、vim /var/www/index.php
<?php echo "hello world\n"; ?>6、打开网页测试
XXXX/index.php