错误 AH00558:httpd:无法可靠地确定服务器的完全限定域名

问题描述 投票:0回答:2

当我尝试执行 sudo apachectl start 时

它返回此错误

AH00558:httpd:无法使用 Dava-Erandas-MacBook-Pro.local 可靠地确定服务器的完全限定域名。全局设置“ServerName”指令以抑制此消息

我所做的是

在 /etc/apache2/apache2.conf 中添加一行包含 ServerName 127.0.0.1

基于此链接https://www.digitalocean.com/community/tutorials/apache-configuration-error-ah00558-could-not-reliously-define-the-server-s-filled-qualified-domain-name

但它仍然返回相同的错误。

我应该怎样做才能消除这个错误?

macos apache
2个回答
7
投票

我在评分最高的答案的评论部分找到了问题这里 我安装了 2 个 apache,一个是系统自带的,另一个是我使用

brew install httpd
安装的 当我运行时错误消失了
brew uninstall httpd


0
投票
my case show this: 
Warning: The following httpd configuration files have not been removed!
If desired, remove them manually with `rm -rf`:
  /usr/local/etc/httpd
  /usr/local/etc/httpd/.httpd.conf.swp
  /usr/local/etc/httpd/extra
  /usr/local/etc/httpd/extra/httpd-autoindex.conf
  /usr/local/etc/httpd/extra/httpd-dav.conf
  /usr/local/etc/httpd/extra/httpd-default.conf
  /usr/local/etc/httpd/extra/httpd-info.conf
  /usr/local/etc/httpd/extra/httpd-languages.conf
  /usr/local/etc/httpd/extra/httpd-manual.conf
  /usr/local/etc/httpd/extra/httpd-mpm.conf
  /usr/local/etc/httpd/extra/httpd-multilang-errordoc.conf
  /usr/local/etc/httpd/extra/httpd-ssl.conf
  /usr/local/etc/httpd/extra/httpd-userdir.conf
  /usr/local/etc/httpd/extra/httpd-vhosts.conf
  /usr/local/etc/httpd/extra/proxy-html.conf
  /usr/local/etc/httpd/httpd.conf
  /usr/local/etc/httpd/httpd.conf.save
  /usr/local/etc/httpd/magic
  /usr/local/etc/httpd/mime.types
  /usr/local/etc/httpd/original
  /usr/local/etc/httpd/original/extra
  /usr/local/etc/httpd/original/extra/httpd-autoindex.conf
  /usr/local/etc/httpd/original/extra/httpd-dav.conf
  /usr/local/etc/httpd/original/extra/httpd-default.conf
  /usr/local/etc/httpd/original/extra/httpd-info.conf
  /usr/local/etc/httpd/original/extra/httpd-languages.conf
  /usr/local/etc/httpd/original/extra/httpd-manual.conf
  /usr/local/etc/httpd/original/extra/httpd-mpm.conf
  /usr/local/etc/httpd/original/extra/httpd-multilang-errordoc.conf
/usr/local/etc/httpd/original/extra/httpd-ssl.conf
/usr/local/etc/httpd/original/extra/httpd-userdir.conf
/usr/local/etc/httpd/original/extra/httpd-vhosts.conf
/usr/local/etc/httpd/original/extra/proxy-html.conf
/usr/local/etc/httpd/original/httpd.conf
© www.soinside.com 2019 - 2024. All rights reserved.