Remote Log Viewer - How to display a log file on a web server using PHP+AJAX
Download
GZIP ZIPFeatures
- View any log file over a web connection
- Automatically refreshes
- Search only for certain terms within a log file
- Exclude lines with certain terms
- Do it all over a HTTP connection!
Why we developed this tool?
After installing Squid+Dansguardian on our server, we wanted a way for less tech-literate employees to be able to observer log files on the Server.
How it works
It uses AJAX calls to a web server, which executes a PHP program which uses tail via shell_exec on the local server to retrieve the log file.
How to Install it
- Download it and extract it to your server under the web directory
- Change line 2 of log/getLog.php to specify the file you wish to display.
define("LOG_FILE",""); - Lines 21 and 22 of log/getLog.php reflect additional parameters you wish to filter out
$exp[0]=SERVER_IP; $exp[1]="getLog.php";
- Use log/index.php to view the log file