systemctl start httpd ; systemctl enable httpd
创建测试文件:
[root@apache ~]# cd /var/www/html
[root@apache html]# vim info.php
[root@apache html]# curl http://192.168.1.21/info.php
PHP is an HTML-embedded scripting language which attempts to make it
easy for developers to write dynamically generated webpages.
#
SetHandler application/x-httpd-php-source
重起apache服务:
apachectl stop
apachectl start
访问测试:
curl http://192.168.1.21/info.php