I have just installed Apache Server 2.2.15 on my machine. But, I am not able to start the server from the Start - > All Programs -> Apache HTTP 2.2 -> Control Apache Server. I can see "Running all Apache services" in the tray. I have tried following suggestions:

1 > Stop IIS and restart Apache 2 > Servername changed to localhost:80. (Query: The line in httpd.conf is

#ServerName localhost:80

Isn't # commented line? Should I uncomment it?

What other suggestions should I try out?

  • I have found that Skype can hold 80 open, make sure port 80 of the localhost is not being used. – Steve Jul 6 '10 at 5:31

If it can't bind to port 80, chances are you also have IIS running, and more than likely, if you're running Vista or 7, IIS's kernel component that keeps hold of port 80. It is possible to change the port IIS listens on (or just uninstall it), but it would probably be easier just to have Apache run on a different port.

Uncomment the line you pasted in your question and change the part after the colon (the port) to something of your choosing. 81 and 8080 are popular, but by no means required. Once that file has been changed and saved, restart Apache, and it should work.

Then, to get to the site that Apache is hosting, use the following URL: http://localhost:<port> So, for example, if you entered 8080 into the config, use http://localhost:8080.

  • Comment out which line? Can you please paste that line from httpd.conf ? – name_masked Jul 6 '10 at 5:39
  • Oh, whoops, mis-spoke. Uncomment the line you pasted, and then change it as mentioned. I'll fix the answer. – Matt S Jul 6 '10 at 5:43
  • Okie I have uncommented the line ServerName localhost:8080 and changed line Listen 80 to Listen 8080 . On entering localhost:8080, I get "It works", but not the apache confirmation page. is it working now? – name_masked Jul 6 '10 at 5:53

From the console run netstat -ab with a sufficiently priviledged user. Then you'll see what application already runs on that port. The important line to have is

Listen 80

Alternatively let it run on another port. What comes up when you connect with a browser? Then you should be able to figure out what app is stealing the port.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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