<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=SafeSquid%3A_Integrasi_Awstats</id>
	<title>SafeSquid: Integrasi Awstats - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=SafeSquid%3A_Integrasi_Awstats"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=SafeSquid:_Integrasi_Awstats&amp;action=history"/>
	<updated>2026-04-07T07:47:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=SafeSquid:_Integrasi_Awstats&amp;diff=48869&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Installing and configuring AWStats to analyze SafeSquid Logs Post a reply 1 post • Page 1 of 1 Installing and configuring AWStats to analyze SafeSquid Logs  by Tech Support...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=SafeSquid:_Integrasi_Awstats&amp;diff=48869&amp;oldid=prev"/>
		<updated>2017-06-23T02:37:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Installing and configuring AWStats to analyze SafeSquid Logs Post a reply 1 post • Page 1 of 1 Installing and configuring AWStats to analyze SafeSquid Logs  by Tech Support...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Installing and configuring AWStats to analyze SafeSquid Logs&lt;br /&gt;
Post a reply&lt;br /&gt;
1 post • Page 1 of 1&lt;br /&gt;
Installing and configuring AWStats to analyze SafeSquid Logs&lt;br /&gt;
&lt;br /&gt;
by Tech Support One » Wed Jan 07, 2009 5:54 pm&lt;br /&gt;
AWStat requires Perl for running and httpd service to view the log report.&lt;br /&gt;
&lt;br /&gt;
1. Download the latest Awstats packge from the internet to /usr/local/src directory -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    cd /usr/local/src&lt;br /&gt;
    wget -nd http://prdownloads.sourceforge.net/awstats/awstats-6.9.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Extract the package -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    tar xvzf awstats-6.9.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Copy awstats-6-9 directory to /usr/local/awstats directory&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    cp -rfv /usr/loca/src/wstats-6.9 /usr/local/awstats&lt;br /&gt;
    cd /usr/local/awstats/tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Run awstats_configure.pl perl script for setting configuration parametters&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    perl awstats_configure.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. You will be asked to enter the path to httpd configuration file. Enter the path -&lt;br /&gt;
/etc/httpd/conf/httpd.conf (This is the default path of the httpd service in Fedora)&lt;br /&gt;
&lt;br /&gt;
6. You will be asked to press 'y' to build the configuraion.&lt;br /&gt;
&lt;br /&gt;
7. You will be asked to give a name to the configuraion file. Enter the IP of SafeSquid / Apache Server -&lt;br /&gt;
192.168.0.178&lt;br /&gt;
&lt;br /&gt;
8. You will be asked to define the config file path -&lt;br /&gt;
/etc/awstats&lt;br /&gt;
&lt;br /&gt;
9. Next, the httpd service will be restarted and you should get the follwoing message&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    -----&amp;gt; Add update process inside a scheduler&lt;br /&gt;
    Sorry, configure.pl does not support automatic add to cron yet.&lt;br /&gt;
    You can do it manually by adding the following command to your cron:&lt;br /&gt;
    /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=192.168.0.178&lt;br /&gt;
    Or if you have several config files and prefer having only one command:&lt;br /&gt;
    /usr/local/awstats/tools/awstats_updateall.pl now&lt;br /&gt;
    Press ENTER to continue...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. When you press Enter to continue, you should get the following message -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    A SIMPLE config file has been created: /etc/awstats/awstats.192.168.0.178.conf&lt;br /&gt;
    You should have a look inside to check and change manually main parameters.&lt;br /&gt;
    You can then manually update your statistics for '192.168.0.178' with command:&lt;br /&gt;
    &amp;gt; perl awstats.pl -update -config=192.168.0.178&lt;br /&gt;
    You can also build static report pages for '192.168.0.178' with command:&lt;br /&gt;
    &amp;gt; perl awstats.pl -output=pagetype -config=192.168.0.178&lt;br /&gt;
&lt;br /&gt;
    Press ENTER to finish...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Press Enter to finish the configuration.&lt;br /&gt;
&lt;br /&gt;
11. Next, you will have to edit the configutraion file -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    vim /etc/awstats/awstats.192.168.0.178.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12. Locate the LogFile= parameter and specify the path to SafeSquid Extended Log -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    LogFile=&amp;quot;/opt/safesquid/safesquid/logs/extended/extended.log&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
13. Locate the LogFormat= parameter and modify it as follows -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    LogFormat=&amp;quot;%otherquot %other %host %lognamequot %otherquot %time1 %methodurl %code %bytesd %refererquot %uaquot %other %extra1 %extra2 %extra3 %otherquot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
14. AWStats, by default, shows domains/country chart.&lt;br /&gt;
Since this is not required in a proxy reports, so you can disable it. Locate ShowDomainsStats=PHB parameter, and disable it -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    ShowDomainsStats=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
15. If you have authenticated users, and would to dispaly a chart for authenticated users, locate ShowAuthenticatedUsers=0 and make it -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    ShowAuthenticatedUsers=PHBL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
16. If you would like to display a chart of all instances when a filter was activated, like ClamAV, URL Filter, URL Blacklist, etc. insert the following under the &amp;quot;# EXTRA SECTIONS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    #This section displays the summary of all requests blocked by various filter&lt;br /&gt;
    ExtraSectionName1=&amp;quot;Summary of Security Breaches&amp;quot;&lt;br /&gt;
    ExtraSectionCondition1=&amp;quot;extra1,(ClamAV|dnsbl|url\-filter|keyword\-filter|mime\-filter|urlbl)&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle1=&amp;quot;Filter-Wise&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues1=&amp;quot;extra1,([^\&amp;quot;]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes1=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow1=1&lt;br /&gt;
    MaxNbOfExtra1=10&lt;br /&gt;
    MinHitExtra1=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when ClamAV was activated&lt;br /&gt;
    ExtraSectionName2=&amp;quot;Security Breaches Prevented by CLAM ANTI VIRUS&amp;quot;&lt;br /&gt;
    ExtraSectionCondition2=&amp;quot;extra1,ClamAV&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle2=&amp;quot;Threats Detected &amp;amp; Blocked&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues2=&amp;quot;extra2,([^\&amp;quot;]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes2=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow2=1&lt;br /&gt;
    MaxNbOfExtra2=10&lt;br /&gt;
    MinHitExtra2=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when DNS Blacklist was activated&lt;br /&gt;
    ExtraSectionName3=&amp;quot;Security Breaches Prevented by DNS BLACKLIST&amp;quot;&lt;br /&gt;
    ExtraSectionCondition3=&amp;quot;extra1,dnsbl&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle3=&amp;quot;Domains Bloked&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues3=&amp;quot;extra2,([^\&amp;quot;]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes3=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow3=1&lt;br /&gt;
    MaxNbOfExtra3=10&lt;br /&gt;
    MinHitExtra3=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when URL Filter was activated&lt;br /&gt;
    ExtraSectionName4=&amp;quot;Security Breaches Prevented by URL FILTER&amp;quot;&lt;br /&gt;
    ExtraSectionCondition4=&amp;quot;extra1,url\-filter&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle4=&amp;quot;URLs Blocked&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues4=&amp;quot;URL,(.+:\/\/[^\/]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes4=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow4=1&lt;br /&gt;
    MaxNbOfExtra4=10&lt;br /&gt;
    MinHitExtra4=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when Keyword Filter was activated&lt;br /&gt;
    ExtraSectionName5=&amp;quot;Security Breaches Prevented by KEYWORD FILTER&amp;quot;&lt;br /&gt;
    ExtraSectionCondition5=&amp;quot;extra1,keyword\-filter&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle5=&amp;quot;Score of blocked pages&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues5=&amp;quot;URL,(.+:\/\/[^\/]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes5=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow5=1&lt;br /&gt;
    MaxNbOfExtra5=10&lt;br /&gt;
    MinHitExtra5=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when Mime FIlter was activated&lt;br /&gt;
    ExtraSectionName6=&amp;quot;Security Breaches Prevented by MIME FILTER&amp;quot;&lt;br /&gt;
    ExtraSectionCondition6=&amp;quot;extra1,mime\-filter&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle6=&amp;quot;Column Title&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues6=&amp;quot;extra2,([^\&amp;quot;]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes6=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow6=1&lt;br /&gt;
    MaxNbOfExtra6=10&lt;br /&gt;
    MinHitExtra6=1&lt;br /&gt;
&lt;br /&gt;
    #This section displays instances when URL Blacklist was activated&lt;br /&gt;
    ExtraSectionName7=&amp;quot;Security Breaches Prevented by URL BLACKLIST&amp;quot;&lt;br /&gt;
    ExtraSectionCondition7=&amp;quot;extra1,urlbl&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnTitle7=&amp;quot;Blocked Categories&amp;quot;&lt;br /&gt;
    ExtraSectionFirstColumnValues7=&amp;quot;extra2,([^\&amp;quot;]+)&amp;quot;&lt;br /&gt;
    ExtraSectionStatTypes7=PHBL&lt;br /&gt;
    ExtraSectionAddSumRow7=1&lt;br /&gt;
    MaxNbOfExtra7=10&lt;br /&gt;
    MinHitExtra7=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
16. Save and close the conf file.&lt;br /&gt;
&lt;br /&gt;
16. Now you can generate a report with the command -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    cd /usr/local/awstats/tools/&lt;br /&gt;
    ./awstats_updateall.pl now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should get this message -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    Running '&amp;quot;/usr/local/awstats/wwwroot/cgi-bin/awstats.pl&amp;quot; -update -config=192.168.0.178 -configdir=&amp;quot;/etc/awstats&amp;quot;' to update config 192.168.0.178&lt;br /&gt;
    Create/Update database for config &amp;quot;/etc/awstats/awstats.192.168.0.178.conf&amp;quot; by AWStats version 6.9 (build 1.925)&lt;br /&gt;
    From data in log file &amp;quot;/opt/safesquid/safesquid/logs/extended/extended.log&amp;quot;...&lt;br /&gt;
    Phase 1 : First bypass old records, searching new record...&lt;br /&gt;
    Searching new records from beginning of log file...&lt;br /&gt;
    Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...&lt;br /&gt;
    Jumped lines in file: 0&lt;br /&gt;
    Parsed lines in file: 3691&lt;br /&gt;
    Found 337 dropped records,&lt;br /&gt;
    Found 2 corrupted records,&lt;br /&gt;
    Found 0 old records,&lt;br /&gt;
    Found 3352 new qualified records.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
17. To view the log report, you need to enter this URL in the browser -&lt;br /&gt;
http://&amp;lt;ip of the linux machine&amp;gt;/awstats/awstats.pl?-confdig=&amp;lt;name of the config file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    Enter -&lt;br /&gt;
    http://192.168.0.178/awstats/awstats.pl?-config=192.168.0.178&lt;br /&gt;
    This will display the generated report.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
18. You can set cron jobs to update AWStats database by inserting following lines in the /etc/crontab file&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    # This will update databse of the awstats every nighat at 12.05a.m.&lt;br /&gt;
    5 00 * * * root /usr/local/awstats/tools/awstats_updateall.pl now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
19. Save and restart cron -&lt;br /&gt;
&lt;br /&gt;
Code: Select all&lt;br /&gt;
    /etc/init.d/crond restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://www.safesquid.com/html/viewtopic.php?t=3002&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>