0
点赞
收藏
分享

微信扫一扫

apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for

两岁时就很帅 2021-09-22 阅读 53
日记本

报错

httpd: apr_sockaddr_info_get() failed for XX(主机名)
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

打开主配置文件httpd.conf

找到修改 ServerName 主机名:80 (删除注释)
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName qiangqiang:80
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 

解决这个问题可以设定 ServerName 和在 /etc/hosts 中填入自己的主机名称 MYHOST,像这样:

1.查看主机名的命令是:hostname

  1. 设置主机名
    vim /etc/hosts
    127.0.0.1 localhost.localdomain localhost XX(主机名)
127.0.0.1               localhost.localdomain localhost qiangqiang
::1             localhost6.localdomain6 localhost6
举报

相关推荐

0 条评论