aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security/apache_mod_security_view_logs.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-24 18:38:29 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-24 18:38:29 -0400
commit3da105b66710a348c831aed8177b106664257ed3 (patch)
tree7252d5d0fea66efe65b3edd01b0529b8383097e6 /config/apache_mod_security/apache_mod_security_view_logs.php
parente8d8ec142abcb5dc5933ede14ab6236efb60b873 (diff)
downloadpfsense-packages-3da105b66710a348c831aed8177b106664257ed3.tar.gz
pfsense-packages-3da105b66710a348c831aed8177b106664257ed3.tar.bz2
pfsense-packages-3da105b66710a348c831aed8177b106664257ed3.zip
Add error log viewer mode
Diffstat (limited to 'config/apache_mod_security/apache_mod_security_view_logs.php')
-rw-r--r--config/apache_mod_security/apache_mod_security_view_logs.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/apache_mod_security/apache_mod_security_view_logs.php b/config/apache_mod_security/apache_mod_security_view_logs.php
index be47f8e3..dcf5bd58 100644
--- a/config/apache_mod_security/apache_mod_security_view_logs.php
+++ b/config/apache_mod_security/apache_mod_security_view_logs.php
@@ -31,7 +31,10 @@
require("guiconfig.inc");
if($_REQUEST['getactivity']) {
- $apachelogs = `cat /var/log/httpd-access.log`;
+ if($_REQUEST['logtype'] == "error")
+ $apachelogs = `cat /var/log/httpd-error.log`;
+ else
+ $apachelogs = `cat /var/log/httpd-access.log`;
echo "Apache+Mod_Security_Proxy Server logs as of " . date("D M j G:i:s T Y") . "\n\n";
echo $apachelogs;
exit;
@@ -104,6 +107,13 @@ if ($_POST['clear']) { }
</form>
</td>
</div>
+<?php
+ if($_REQUEST['logtype'] == "error") {
+ echo "<br/>View <a href='apache_mod_security_view_logs.php?logtype=error'>error</a> logs";
+ } else {
+ echo "<br/>View <a href='apache_mod_security_view_logs.php'>access</a> logs";
+ }
+?>
<?php include("fend.inc"); ?>
</body>
</html>