Apache 24 启动提示 httpd.exe: Could not reliably determine the server's fully qualified domain name
问题
在 Windows 系统运行 Apache24,控制台出现了警告提示,但不是致命错误。
D:\develop\opt\Apache24\bin>httpd.exe
AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using fe80::55a5:3508:f579:8ad6. Set the 'ServerName' directive globally to suppress this message
解决方法
编辑httpd.conf
配置文件。找到下面的配置,大约在226行。
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
将 #ServerName www.example.com:80
修改成本地的 ip 地址或者localhost,也可以 hosts 一个域名。
ServerName 127.0.0.1:80
#ServerName localhost:80
# 或者hosts域名
#ServerName test.com:80