Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've been developing web apps for several months now on my mac using the built in apache server and everything has been fine. I restarted my mac this morning and now when I try to connect to anything on localhost I get the error: "Could not connect to localhost". Here are some things I have already checked:

  • Apache is running. System Preferences->Sharing->Web Sharing is turned on.
  • I ran "apachectl configtest" and it returned "Syntax OK"

Any help would be appreciated.

share|improve this question
    
What happens if you ping localhost and what is ib console(as an admin user)? –  Mark Nov 21 '11 at 15:20
    
64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.076 ms –  Groppe Nov 21 '11 at 15:30
    
Is this something you ever figured out or are you still in need of help in answering? –  bmike Feb 21 '12 at 16:53
    
I actually no longer use the machine in question, so I don't need assistance any longer. –  Groppe Feb 22 '12 at 0:02
add comment

2 Answers

From the terminal curl http://localhost || echo $? might be a good place to start to determine if this is a resource issue, routing issue or apache issue.

You'll either get back a valid http response or an error that may lead the way to knowing why your other web clients are not connecting to localhost on port 80.

share|improve this answer
add comment

I can recommend MAMP. It's everything you need in one software-package. Apache, MySQL and PHP. I use it for years and I never met a problem!

share|improve this answer
    
This says nothing about the question –  Mark Nov 21 '11 at 15:19
    
No true, but it will solve Groppe's issue never the less... –  Michiel Nov 21 '11 at 17:23
    
Why - as apache is still here and runs with firewalls in exactly the same way –  Mark Nov 21 '11 at 22:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.