CS50 - Apache Not Running - Won't Start



This is the second time I’ve run into this issue. And I don’t know how to fix it myself.

Command line prompt:
~/workspace/pset8/ $ apache50 start public/

Error Message:

Setting Apache’s document root to /home/ubuntu/workspace/pset8/public …

  • Starting web server apache2
  • The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    Apache failed to start!

When I had this issue yesterday, there was a PID file for Apache that hadn’t been removed when it stopped running. I’m assuming that this is what’s happened now as well. Unfortunately, I don’t know where to locate it in order to remove it.

Also, why isn’t it being removed automatically?



could you tell the url of workspace where you saw this error?


Is this what you’re looking for?



this seems to be same as the issue described in http://cs50.stackexchange.com/questions/16426/the-apache2-instance-did-not-start-within-20-seconds-how-do-i-access-the-log, could you check if echo > ~/lib/apache2/log/error.log fixed the issue for you too?


It did! And apologies for a duplicate post.

Many thanks!