Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Apr 2, 2020 3:07 PM

Hi there, Mmiliem.


I see that you're receiving a message that Safari can't connect to the server, and I'm glad to help with this.


If you can’t open a website in Safari on Mac -- This article provides the information and steps that you need when Safari isn't working as it should.


Take care.

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 20, 2020 10:12 PM in response to Teddy_B

I’m setting up MAMP and Wordpress on my Mac computer, when I get to the point to add WP, I get this message:

Safari can’t connect to the server “local host”. The servers are Apache on 8888, MySQL on 8889. Something isn’t working and I don’t know what. I followed the instructions perfectly’ but nothing works.

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.

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 ID.