Safari cannot connect to the server 'localhost' on a mac.

How can this be fixed?

MacBook

Posted on Mar 31, 2020 12:03 PM

Reply
4 replies

Apr 2, 2020 3:18 PM in response to Mmiliem

What you’re reporting would be typical and expected, if there’s no web server running on port 80 (http) or 443 (https).


What specific apps are involved here?


What are your requirements for the local web server?


Which specific web server(s) are you running on your local Mac?


Do you have user home directory web sharing enabled, if you’re trying to use that feature?


What responses are in the server logs for the web server you’re running and connecting into?


What happens when you ping localhost?


Any add-on anti-malware, add-on anti-virus, add-on VPN clients, add-on cleaners, or add-on firewall apps installed?


See these threads for some related details and discussions, too:

https://discussions.apple.com/thread/3158037

https://discussions.apple.com/thread/2057080

Apr 22, 2020 9:51 AM in response to Mmiliem

Please start your own thread, as MAMP is a completely different question.


When you start the new three, do look at the MAMP startup logs for troubleshooting information.


If this Mac is to be exposed to the ‘net, please also identify how this Mac has been isolated (firewalled, usually) from any confidential data, and from the remainder of the local network. This as MAMP is intended for development and is expressly not (when last I checked) hardened against attacks, and as Wordpress itself has been subject to security breaches. Expect the server to be breached, and take steps to isolate and contain those breaches.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari cannot connect to the server 'localhost' on a mac.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.