zoukankan      html  css  js  c++  java
  • 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 ~]# 
  • 相关阅读:
    ubuntu下使用sudo 出现unable to resolve host 解决方法
    Ubuntu下使用mysqli-connect连接mysql时报错:ERROR 1698 (28000): Access denied for user 'root'@'localhost'
    Ubuntu下安装LNMP之独立添加php扩展模块
    Ubuntu下安装LNMP之Mysql的安装及卸载
    Ubuntu下安装LNMP之php7的安装并配置Nginx支持php及卸载php
    Ubuntu使用vim编辑器时出现上下左右键变成ABCD
    Ubuntu下安装LNMP之nginx的卸载
    Ubuntu下使用find / -name aaa* 提示“find: 路径必须在表达式之前: XXXX”
    Ubuntu下安装LNMP之nginx的安装
    ubuntu使用su切换root用户提示“认证失败”
  • 原文地址:https://www.cnblogs.com/Crazy-Liu/p/11550822.html
Copyright © 2011-2022 走看看