Apache windows启动调试时报错或警告
httpd: Could not reliably determine the server's fully qualified domain name, using xxx Set the 'ServerName' directive globally
这是因为未配置域名服务器或者域名服务器未能找到该域名的地址。
修改位置:安装目录中的Apache24/conf /
的文件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.
#
#ServerName www.example.com:80
根据自己的需求添加地址和端口号 比如可以添加本地地址
#
# 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 localhost
这样警告语句就没有了!
执行httpd -k start -n "服务器名称"
通过浏览器浏览 localhost
地址,浏览器显示It works!
说明Apache服务已开启!