配置httpd服务
[root@pc3 ~]# systemctl start httpd
[root@pc3 ~]# vim /etc/httpd/conf/httpd.conf
[root@pc3 ~]# echo NSD Web Server > /var/www/html/index.html
[root@pc3 ~]# curl 192.168.88.3
验证httpd识别PHP网页
vim /var/www/html/test.php
<?php
phpinfo();
?>
能读懂则显示php的信息,读不懂则代码原样输出

[root@pc3 ~]# yum -y install php php-xml php-json #识别php的代码
[root@pc3 ~]# ls /etc/httpd/conf.d #在调用配置文件中有php.conf文件
autoindex.conf README welcome.conf
php.conf userdir.conf
[root@pc3 ~]# systemctl restart httpd #重启服务调用php.conf的配置服务