#!/usr/bin/perl my ($log, $locate); $log = -e "/var/log/httpd/error_log" ? "/var/log/httpd/error_log" : -e "/usr/local/apache/logs/error_log" ? "/usr/local/apache/logs/error_log" : do { $locate = `locate error_log | grep '\\(apache\\|httpd\\)'`; chomp $locate; $locate; } ? $locate : do { print "Content-Type: text/plain\n\n" . "Sorry, I could not locate your log. Do not worry, it probably does exist."; exit; }; print "Content-Type: text/plain\n\n"; print `tail $log`;