似乎有一些问题相似但无法找到答案.
一小时前(以及那之前的几个月:-))一切正常.它看起来像更新到XCode 9.2后停止工作.
我已经更新到MacOS High Sierra 10.13.2,因为包含了一些Apache更新,但它没有解决问题.也许XCode更新改变了httpd.conf文件?我不太熟悉那里的设置,所以我无法确定该文件中是否有更改.
Chrome出错:
无法访问此网站
www.example.dev拒绝连接.
ERR_CONNECTION_REFUSED
我的设置:
MacOS High Sierra 10.13.2
MAMP Pro 4.2(最新版本)
端口是Apache:80和MySQL:3306
VPN已关闭
如果我运行sudo nano /private/etc/hosts它有以下条目(我在www.example.dev上运行我的本地网站)
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 www.example.dev # Note; I added this myself a long time ago as else the URL including www doesn't work
127.0.0.1 example.dev # MAMP PRO - Do NOT remove this entry!
::1 example.dev # MAMP PRO - Do NOT remove this entry!
Run Code Online (Sandbox Code Playgroud)
我尝试了什么:
apachectl configtest在终端运行它返回Syntax OKUPDATE
刚刚看到MAMP Pro关闭了:
Syntax OK与apachectl configtest当我运行sudo apachectl stop它返回/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
更新2
出于挫折感,我下载了Firefox来检查并...我所有的本地开发站点都在那里工作!在Chrome中,即使清除了浏览数据,我仍然会收到相同的错误.