How about in the apachectl wrapper script you stick something like this at the end.
tail -5 /var/log/httpd/error_log
you should see something like this in a normal startup
- [Fri Apr 22 23:39:20 2011] [notice] Digest: generating secret for
digest authentication ...
- [Fri Apr 22 23:39:20 2011] [notice] Digest: done
- [Fri Apr 22 23:39:20 2011] [warn] pid file
/mlk/apache/pid/httpd.pid overwritten -- Unclean shutdown of previous
Apache run?
- [Fri Apr 22 23:39:20 2011] [notice] Apache/2.0.63 (Unix) DAV/2
configured -- resuming normal operations
Otherwise any error should at least in part be shown here. The key phrase is hilighted above.
Additional:
/usr/sbin/apachectl is owned by root, you must be a privileged user to do this.
sudo vi /usr/sbin/apachectl
move to the end of the file and insert this between the "esac" and "exit $ERROR" lines.
ie.
esac
sleep 2; tail -5 /var/log/httpd/error_log
exit $ERROR
Note this will print out the last few lines no matter what action you take with the script, stop start, restart. you may want to only put it in the start part of the case statement.
echoline. – quanta Aug 5 '11 at 9:19echoto? Sorry, i am new around and need details :\ – mgPePe Aug 5 '11 at 9:28/usr/sbin/apachectl. – quanta Aug 5 '11 at 10:26