按照网上提示改写了apache2.conf的servername,发现还是不行, 包括改过的serverdocuments路径都没有变,怀疑配置文件的路径不对。
terminal执行apachectl -t -D DUMP_INCLUDES
发现
Included configuration files:
(*) /opt/homebrew/etc/httpd/httpd.conf
于是更改该路经下的servername,改为localhost后重启apache,558error提示消失。