macOS Sierra 10.12.2 Apache 不工作

macOS Sierra 10.12.2 Apache not working

我已经升级到当前版本的 macOS。我想和 Apache 一起工作。好吧,我的问题是,当我尝试使用或不使用 ~Username 访问 localhost 时,我收到一条错误消息,显示 Chrome 上的 ERR_CONNECTION_REFUSED 或 Safari 上的 "Can't open Page"。 Apache 是 运行 和 apachectl configtest 说 "Syntax OK".

我将当前版本的 phpMyAdmin 放入 /Library/WebServer/Documents 并尝试访问它,同样的问题。

我按照本指南中的步骤操作,但没有找到适合我的解决方案 Apache localhost/~username/ not working

所以有人知道我面临的问题是什么吗?我现在一头雾水

我得到了与上面相同的结果,不过使用的是虚拟主机,并且在更新到 macos 10.12.2 后收到 ERR_CONNECTION_REFUSED

我最初的设置是基于这里的优秀帖子:https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc

因此,因为我使用的是 Homebrew,所以我需要做的就是在 CLI 上 运行 brew upgrade,然后是 sudo apachectl restart,然后我备份并 运行宁.