Dglog: Difference between revisions

From Alpine Linux
No edit summary
mNo edit summary
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== What is dglog==
Dlog its a CGI log analyzer for the web content filter DansGuardian, which is being developed under the GNU General Public License (GPL). you need to have DansGuardian installed and working. Dglog2 will read the access.log log file from /var/log/dansguardian directory. You can use dglog to to have a basic analysis of the dansguardian log. Its very simple and basic, but its a good start.
Dlog its a CGI log analyzer for the web content filter DansGuardian, which is being developed under the GNU General Public License (GPL). you need to have DansGuardian installed and working. Dglog2 will read the access.log log file from /var/log/dansguardian directory. You can use dglog to to have a basic analysis of the dansguardian log. Its very simple and basic, but its a good start.


== Set up dglog on Alpine Linux ==
= Install http server and perl =
 
This document will be a very quick c/p guide to setup dglog on Alpine linux. What we will install is the following:
 
* lighttpd
* perl
 
== Install http server and perl ==


'''Installing'''
{{Cmd|apk add lighttpd perl}}


apk add lighttpd perl
= Configure lighttpd =


== Configure lighttpd ==
Edit the {{Path|/etc/lighttpd.conf}} file


'''Edit lighttpg.conf'''
{{Cmd|nano +44 /etc/lighttpd/lighttpd.conf }}


nano +44 /etc/lighttpd/lighttpd.conf
Uncomment the following line:
 
Uncomment line:


  include "mod_cgi.conf"
  include "mod_cgi.conf"


Save and exit (Control X)
Save and exit.


== Installing dglog ==
= Installing dglog =


Make the necesary directory  
Make the necesary directory  


mkdir -p /var/www/localhost/htdocs/cgi-bin/dglog
{{Cmd|mkdir -p /var/www/localhost/htdocs/cgi-bin/dglog}}
cd /var/www/localhost/htdocs/cgi-bin/dglog
{{Cmd|cd /var/www/localhost/htdocs/cgi-bin/dglog}}


Download  
Download  


wget http://dansguardian.pl/pobierz/dglog2.pl -P /var/www/localhost/htdocs/cgi-bin/dglog
{{Cmd|wget http://dansguardian.pl/pobierz/dglog2.pl -P /var/www/localhost/htdocs/cgi-bin/dglog}}


Edit the dglog2.pl file
Edit the dglog2.pl file


nano +104 dglog2.pl
{{Cmd|nano +104 dglog2.pl}}


Uncomment and change  
Uncomment and change  
Line 51: Line 40:
  $cgipath = $ENV{SCRIPT_NAME};
  $cgipath = $ENV{SCRIPT_NAME};


== Starting ==
= Starting =


'''Starting http server and adding to boot'''
Starting http server and adding to boot.


/etc/init.d/lighttpd start && rc-update add lighttpd default
{{Cmd|/etc/init.d/lighttpd start && rc-update add lighttpd default}}


Done! Now you can browse to http://your.ip/cgi-bin/dglog/dglog2.pl and check the DansGuardian log file.
Done! Now you can browse to http://your.ip/cgi-bin/dglog/dglog2.pl and check the DansGuardian log file.
[[Category:Server]]
[[Category:Monitoring]]
[[Category:Perl]]

Revision as of 11:00, 22 January 2013

Dlog its a CGI log analyzer for the web content filter DansGuardian, which is being developed under the GNU General Public License (GPL). you need to have DansGuardian installed and working. Dglog2 will read the access.log log file from /var/log/dansguardian directory. You can use dglog to to have a basic analysis of the dansguardian log. Its very simple and basic, but its a good start.

Install http server and perl

apk add lighttpd perl

Configure lighttpd

Edit the /etc/lighttpd.conf file

nano +44 /etc/lighttpd/lighttpd.conf

Uncomment the following line:

include "mod_cgi.conf"

Save and exit.

Installing dglog

Make the necesary directory

mkdir -p /var/www/localhost/htdocs/cgi-bin/dglog

cd /var/www/localhost/htdocs/cgi-bin/dglog

Download

wget http://dansguardian.pl/pobierz/dglog2.pl -P /var/www/localhost/htdocs/cgi-bin/dglog

Edit the dglog2.pl file

nano +104 dglog2.pl

Uncomment and change

$cgipath = 'http://your.ip/cgi-bin/dglog/dglog2.pl';

Comment

$cgipath = $ENV{SCRIPT_NAME};

Starting

Starting http server and adding to boot.

/etc/init.d/lighttpd start && rc-update add lighttpd default

Done! Now you can browse to http://your.ip/cgi-bin/dglog/dglog2.pl and check the DansGuardian log file.