Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I turned on my computer today and apache wasn't working. This is weird as its been working for the last 6 months without issue.

The only thing I did which may of caused a problem, is I uninstalled a bunch of gems. This shouldn't be the issue though as apache doesn't rely on gems.

I decided to give nginx a try to see if it would work and have the exact same issue.

The symtoms are:

  • I go to http://localhost and get the browsers default 404 page (not rendered by apache/nginx)
  • No error is found anywhere (I checked all logs)
  • Apache is rinning (also tried with Nginx)

How can I debug this to find the root of the problem? I can't think of why this would be happening.

I've tried repairing permissions in case this was the issue, apparently it wasn't. Everything was working the other day, and nothing changed in the apache config.

Update: Here is the output of telnet localhost 80

$ telnet localhost 80
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
share|improve this question
    
What directory is apache supposed to load pages etc from? Is that directory still there? –  AliGibbs Feb 11 '11 at 17:00
    
Yes, the server root is just /usr as I'm using passenger to load rails apps. Apache config all looks good. –  jvatic Feb 11 '11 at 17:11
    
I would normally get "It works!" when visiting localhost/ and get a failed to connect error instead (issued by the browser). –  jvatic Feb 11 '11 at 17:56
    
If you telnet to port 80 does it connect? Also, are you using the built-in OSX Apache or did you compile it by hand? –  Scott Warren Feb 11 '11 at 18:56
    
I've updated my post to include the output of "telnet localhost 80". Its not connecting. –  jvatic Feb 11 '11 at 20:43

1 Answer 1

up vote 0 down vote accepted

http://hintsforums.macworld.com/showthread.php?t=83942

sudo apachectl -t reviled apache couldn't find the passenger gem, which makes sense as I was messing with the gems in rvm ree@global gemset.

The solution was to reinstall the passenger gem with:

$ rvm ree@global
$ gem install passenger

and restart apache.

share|improve this answer

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.