Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a problem with apache2 server today. I just wont respons for localhost but it says it's started.

Env: Mac OSX.

I'm listening on 80 as specified in /private/etc/apache2 lines 51-53.

Listen 80

It seems my configuration is fine, I think:

$ httpd -v
Server version: Apache/2.2.22 (Unix)
Server built:   Jul 12 2012 15:11:26

$ httpd -t
httpd: Could not reliably determine the server's fully qualified domain name, 
using Firemac.local for ServerName
Syntax OK

When trying to do

sudo apachectl restart

There is no error, and when I try

sudo apachectl start

I get

org.apache.httpd: Already loaded and localhost do not respond. If I:

 $ lsof | grep LISTEN


 $ netstat -l | grep http

There is nothing on port :80 listening, and if I:

 ps ax | grep httpd | grep -v grep

I get nothing.

share|improve this question
Does GET<enter><enter> with netcat 80 return anything? If so, try with localhost instead of as well. Please share your complete configuration file if possible. – zmode Oct 15 '12 at 8:13
@zmode I just fixed it by rebuilding the config file from the default one and restarting the server at each changed line. The problem was in the vhosts file where I had and in two different virtual hosts directives - this is the way it should be. I just commented out the alias and it worked. Not sure why... – Vlad Nicula Oct 15 '12 at 8:38

You must log in to answer this question.

Browse other questions tagged .