Best way to troubleshoot apache not starting?

httpd -t will test the syntax of your configuration files and spit out any errors to the terminal.


In some specific cases, a log entry will not be written to disk -- this can occur if logs don't exist, for example, or Apache simply cannot write to the log files due to permissions issues, etc. In such cases, the best way to diagnose an error is to use `strace':

[root@server ~]# strace -Ff apachectl start

While the output will be quite verbose, if Apache fails to start for any reason, you'll see a write() at the tail end with the contents of what would be entered in the logs with the reason it's failing (if it's not logging why in the error log, don't be surprised if the error message contains "Cannot open log" with the path to the log ;).

Though looking at your comment regarding mod_fcgid, I'd suggest reviewing the Apache configuration and examining references to mod_fcgid -- it sounds like it's trying to open a literal "mod_fcgid" file as opposed to loading the module.


Any errors should be printed to the error logs (often at /var/log/http/error_logs. Grep for ErrorLog in your httpd.conf to find out where.

I recommend using two windows. Do a 'tail -f error_log' in one window, and use another window to run the 'apachectl restart' command. After you find the error, update your answer here with the error message.