当我尝试执行 sudo apachectl start 时
它返回此错误
AH00558:httpd:无法使用 Dava-Erandas-MacBook-Pro.local 可靠地确定服务器的完全限定域名。全局设置“ServerName”指令以抑制此消息
我所做的是
在 /etc/apache2/apache2.conf 中添加一行包含 ServerName 127.0.0.1
但它仍然返回相同的错误。
我应该怎样做才能消除这个错误?
我在评分最高的答案的评论部分找到了问题这里 我安装了 2 个 apache,一个是系统自带的,另一个是我使用
brew install httpd
安装的
当我运行时错误消失了brew uninstall httpd
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