0

I've been ticking along on PSET8 for a while and today I'm unable to see my work in action. I have not changed anything in the IDE or done anything unusual - today is just an 'Apache won't start' kind of day, which means that my workflow has stopped dead until I can see what i'm doing.

here is a screenshot: enter image description here "The apache2 instance did not start within 20 seconds. Please read the log files to discover problems Apache failed to start!"

Question in 2 parts

  1. Ultimately how do I get apache2 to run again?
  2. How do I access the log files within IDE to see why it isn't working?

3 Answers 3

1

So, while I still do not know what happened nor do I understand the solution. I found that another CS50x student had the same problem and posted about it on the Cloud9 community boards here.

The 'solution' post reads thus:

Hi, problem appears to have resolved using echo > ~/lib/apache2/log/error.log. I have access again

And I typed into the terminal:

echo > ~/lib/apache2/log/error.log

Which worked! I don't know what it did, but apache2 is now running just as it used to.

1
  • What it does is it deletes the content of the error log and writes an empty line. > makes it replace the content, >> would make it append, more information for example in the Advanced Bash-Scripting Guide. I find it at least irritating that deleting the messages caused by the problem should solve the problem itself.
    – Blauelf
    Commented May 16, 2017 at 14:03
0

The apache logs are located in ~/lib/apache2/log. Hopefully the information in one of the log files will lead you to the answer to your first question.

2
  • "~/lib/apache2/log/error.log bash: /home/ubuntu/lib/apache2/log/error.log: Permission denied"
    – McKlatch
    Commented Mar 15, 2016 at 10:00
  • It's a text file, it's not executable. Try cd ~/lib/apache2/log and look at the file in your favorite text editor (gedit, vi) or viewer (tail, pg). Commented Mar 15, 2016 at 13:21
0

~/workspace/ $ rm ~/lib/apache2/run/apache2.pid

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .