Information in this page is outdated. Last update was made on 17 November 2017.
Localhost unable to connect after upgrading to macOS High Sierra
I was notified to upgrade from maxOS Sierra to macOS High Sierra earlier and I thought for few seconds and hit install button.
I waited for almost an hour for it to finish the OS upgrade.
After it, I checked my local sites, and I was unable to connect. It further states using Firefox Quantum, the ff:
Firefox can’t establish a connection to the server at accounting.dev.
- The site could be temporarily unavailable or too busy. Try again in a few moments.
- If you are unable to load any pages, check your computer’s network connection.
- If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
I restarted nginx several times, and even checking if it was running non-sudo. I am running it via sudo so that I can use port 80. I also upgraded nginx to its latest version. And, a lot of stuff.
After searching and searching, here’s the solution:
brew install dnsmasq. If you have it already, uninstall it,
brew remove dnsmasq.
Remove dnsmasq config file and directory from
cd /usr/local/etc rm -rf dnsmasq.conf dnsmasq.d
And finally, restart nginx.
[sudo] brew services stop nginx [sudo] brew services start nginx