apache状态显示报错AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdo...is message
今天启动apache查看状态发现报错,说不能确认服务器完全确认域名,以下是报错内容:
[root@localhost ~]# service httpd status Redirecting to /bin/systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2019-09-19 16:13:13 CST; 19min ago Docs: man:httpd(8) man:apachectl(8) Process: 4342 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Main PID: 4459 (httpd) Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" CGroup: /system.slice/httpd.service ├─4459 /usr/sbin/httpd -DFOREGROUND ├─4460 /usr/sbin/httpd -DFOREGROUND ├─4461 /usr/sbin/httpd -DFOREGROUND ├─4462 /usr/sbin/httpd -DFOREGROUND ├─4463 /usr/sbin/httpd -DFOREGROUND └─4464 /usr/sbin/httpd -DFOREGROUND Sep 19 16:13:13 localhost.localdomain systemd[1]: Starting The Apache HTTP Server... Sep 19 16:13:13 localhost.localdomain httpd[4459]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdo...is message ###就是这一个 Sep 19 16:13:13 localhost.localdomain systemd[1]: Started The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full.
解决办法:
vi /etc/httpd/conf/httpd.conf 加入一句 ServerName localhost:80
然后重启apache服务
[root@localhost ~]# vi /etc/httpd/conf/httpd.conf [root@localhost ~]# service httpd restart Redirecting to /bin/systemctl restart httpd.service [root@localhost ~]# service httpd status Redirecting to /bin/systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2019-09-19 16:38:08 CST; 5s ago Docs: man:httpd(8) man:apachectl(8) Process: 4610 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Main PID: 4615 (httpd) Status: "Processing requests..." CGroup: /system.slice/httpd.service ├─4615 /usr/sbin/httpd -DFOREGROUND ├─4616 /usr/sbin/httpd -DFOREGROUND ├─4617 /usr/sbin/httpd -DFOREGROUND ├─4618 /usr/sbin/httpd -DFOREGROUND ├─4619 /usr/sbin/httpd -DFOREGROUND └─4620 /usr/sbin/httpd -DFOREGROUND Sep 19 16:38:08 localhost.localdomain systemd[1]: Starting The Apache HTTP Server... Sep 19 16:38:08 localhost.localdomain systemd[1]: Started The Apache HTTP Server. [root@localhost ~]#
专业从事搬砖多年,还是在继续搬砖中,厚积薄发~