apache状态显示报错AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdo...is message

 

 

Today start apache view the status of discovery being given that the server can not be confirmed completely confirm the domain name, the following error contents are:

 

[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.

 

Solution:

vi /etc/httpd/conf/httpd.conf join a  ServerName localhost: 80

 

Then restart apache service

 

 

[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 ~]# 

 

Guess you like

Origin www.cnblogs.com/Crazy-Liu/p/11550824.html
Recommended