Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Apache didn't start up automatically like it usually does. I'd like to try to find out why. It looks like it never started up today, so nothing in /var/log/apache2/error.log since it never ran. As I understand it, the apache script is /etc/init.d/apache2 so I'd like to find some messages somewhere regarding this script. However, I can't find anything in /var/log/messages or the syslog.

Is there anywhere in the system where it says "Yep, I'm starting up /etc/init.d/apache2 now; it worked" or especially "It didn't work and here's why!" ?

I am using Ubuntu Release 10.04 (lucid), Kernel Linux 2.6.32-38, and GNOME 2.30.2 .

share|improve this question
    
Did you check /var/log/syslog? –  Justin Andrusk Apr 7 '12 at 0:36
    
Yes, that's what I meant when I wrote "syslog" at the end of my first paragraph. –  Roy Apr 7 '12 at 3:40
add comment

2 Answers 2

up vote 1 down vote accepted

You could go to a terminal and type in "sudo /etc/init.d/apache2 restart" in a terminal, and see what kind of error message you get. One common reason, I believe, is because of some module that was either added, changed, or had a change made to a corresponding config file (such as php.ini). If all else fails, go to the directory /etc/apache2/mods-enabled, and move module links out into a temporary directory, and if apache starts, you can put them back one by one.

Be aware, though, that the error message may be misleading. It may get an error loading a module not because the module is bad, but because it's configuration file is bad.

share|improve this answer
1  
Thanks! This helped me find out what was wrong. It was not a change to the Apache modules. Instead, it was looking for a configuration file in /etc/apache2/conf.d that got removed (i.e. there was a symbolic link to something that got removed). I did get an error message on the terminal which cleared this up, but I wonder if these messages are logged anywhere? I verified that they aren't in any of the log files you get in Log File Viewer (messages, syslog, user log, etc.) –  Roy Apr 7 '12 at 3:46
    
Glad I was able to help. I don't know which log it might be in, but I would have guessed something in /var/log/apache2/error.log. Personally, if something doesn't run, I tend to use the terminal to try running it, and see what it says. That seems to usually work for me, without needing to search for a bunch of log files to find the right one. –  Marty Fried Apr 7 '12 at 5:24
add comment

from:

View log files in Ubuntu Linux
http://www.cyberciti.biz/faq/ubuntu-linux-gnome-system-log-viewer/

/var/log/apache2/*  :  Apache web server log files directory
share|improve this answer
    
I referenced /var/log/apache2/error.log in my question. Those logs weren't the answer as I mentioned. –  Roy Apr 7 '12 at 4:04
add comment

Your Answer

 
discard

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.