How to access Apache web server (httpd) error logs for Amazon EC2 Linux and most other Linux varieties also.
1. SSH into the system.
2. Then change to Superuser using the “su” command.
3. Then change directory like so: cd /var/log/httpd/
4. Now use this syntax at the command prompt:
tail -n 300 error_log-20130602 | more
This will show you the last 300 lines of the error log file error_log-20130602
The “| more” just splits up the output into more than one screen. So that you can the complete text of the error logs.
The opposite of “tail” is “head” which instead of the last lines of errors, will show you the first few lines of errors.
There are more logs for you here: /var/log/