Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 installed apache with apt-get install apache2 then tried wget localhost and got:

--2012-09-21 23:12:29--  http://localhost/
Resolving localhost...
Connecting to localhost||:80... failed: Connection refused

Then I tried /etc/init.d/apache2 status and sure enough, apache2 wasn't running but it still wouldn't start the service if I do /etc/init.d/apache2 start.

Any help is appreciated!

share|improve this question
Please provide the errors that are returned when you try to start the service. – Shane Madden Sep 21 '12 at 21:33
start by doing an apache2ct -t to check the configuration. – rbanffy Sep 22 '12 at 0:25

You need to configure Apache.

1) Edit the default vhost to point at your docroot

2) Edit the Listen lines to bind to the appropriate interface.

3) If you're binding to port 80, it needs to be started as root.

Check /var/log/apache2/error_log for the relevant error.

share|improve this answer

Your Answer


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.