centos7安装apach

直接使用yum install httpd进行安装

centos7使用 systemctl start httpd

systemctl stop httpd
systemctl start httpd
systemctl status httpd

查看状态的时候有个报错
centos7安装apach

[root@iZuf61s2xZ ~]# httpd -t
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using XX. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK

解决办法参考:
https://blog.csdn.net/a13568hki/article/details/103428237

vim /etc/httpd/conf/httpd.conf

#ServerName www.example.com:80
改成
ServerName localhost:80

上一篇:使用vue,react,angular等框架和不使用框架使用jquery的优缺点


下一篇:PHP连接数据库模板