在系统启动时apache,没有启动起来,查看“事件查看器”发现报一些错误:
The Apache service named reported the following error:
>>> httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.200 for ServerName
回头,查看apache日志logs/error.log,发现报的是类似的错误。
都是说Could not reliably determine the server's fully qualified domain name。
我先分析了下,似乎是apache启动时可能会查询DNS来验证ServerName的配置。可是我用的是私有IP的,这怎么配置?
抱着疑问的态度,我又查看 httpd.conf 文件,查找关于ServerName配置的片段,我忽然发现,人家已经在注释中把这个问题说的很详细,可是我在开始的配置中却忽视了他。
#
# 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.
#
#ServerNamewww.web8cn.com:80