From f59323448357178258530b9e87193898a0506a9e Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 9 Dec 2012 03:16:23 -0500 Subject: [PATCH] Rename awstats.conf so update.sh doesn't use it awstats' update.sh tries to run awstats.conf (if it exists) and awstats.*.conf. I want to use awstats.conf as my base config file which the packager will upgrade for me, and have my domains in distinct config files, rather than editing awstats.conf to contain my "default" domain. So, I use dpkg-divert --rename --local --add /etc/awstats/awstats.conf to hopefully make the distributors version live in awstats.conf.distrib, where update.sh won't use it, and change my per-domain files to reference it there. --- awstats.alex.conf | 2 +- awstats.conf => awstats.conf.distrib | 291 +++++++++++++++------------ awstats.olinda.conf | 6 +- cron-script.sh | 1 + 4 files changed, 167 insertions(+), 133 deletions(-) rename awstats.conf => awstats.conf.distrib (89%) diff --git a/awstats.alex.conf b/awstats.alex.conf index 13cad88..c8c20d5 100644 --- a/awstats.alex.conf +++ b/awstats.alex.conf @@ -1,6 +1,6 @@ # AWSTATS CONFIGURE FILE 6.8 -Include "awstats.conf" +Include "awstats.conf.distrib" LogFile="/var/log/apache2/access.alex.log" SiteDomain="alex.mit.edu" diff --git a/awstats.conf b/awstats.conf.distrib similarity index 89% rename from awstats.conf rename to awstats.conf.distrib index e4fa518..2f22567 100644 --- a/awstats.conf +++ b/awstats.conf.distrib @@ -1,4 +1,4 @@ -# AWSTATS CONFIGURE FILE 6.8 +# AWSTATS CONFIGURE FILE 7.0 #----------------------------------------------------------------------------- # Copy this file into awstats.www.mydomain.conf and edit this new config file # to setup AWStats (See documentation in docs/ directory). @@ -10,7 +10,7 @@ # Note that environment variable AWSTATS_CURRENT_CONFIG is always defined with # the config value in an AWStats running session and can be used like others. #----------------------------------------------------------------------------- -# $Revision: 1.334 $ - $Author: eldy $ - $Date: 2008/10/05 11:01:31 $ +# $Revision: 1.350 $ - $Author: eldy $ - $Date: 2010/09/29 19:16:21 $ @@ -445,9 +445,9 @@ KeepBackupOfHistoricFiles=0 # Default index page name for your web server. # Change : Effective for new updates only # Example: "index.php index.html default.html" -# Default: "index.html" +# Default: "index.php index.html" # -DefaultFile="index.html" +DefaultFile="index.php index.html" # Do not include access from clients that match following criteria. @@ -501,7 +501,6 @@ SkipFiles="" # referrer. Parameter must receive a local file name containing rules applied # on referrer field. If parameter is empty, no filter is applied. # An example of such a file is available in lib/blacklist.txt -# You can download updated version at http://www.jayallen.org/comment_spam/ # Change : Effective for new updates only # Example: "/mylibpath/blacklist.txt" # Default: "" @@ -763,6 +762,7 @@ NbOfLinesForCorruptedLog=50 # Use the name of this script in WrapperScript parameter. # Change : Effective immediatly # Example: "awstatslauncher.pl" +# Example: "awstatswrapper.cgi?key=123" # Default: "" # WrapperScript="" @@ -1016,7 +1016,12 @@ ShowFileTypesStats=HB # Show file size chart (Not yet available) # Context: Web, Streaming, Mail, Ftp # Default: 1, Possible column codes: None -ShowFileSizesStats=0 +ShowFileSizesStats=0 + +# Show downloads chart. +# Context: Web, Streaming, Ftp +# Default: HB, Possible column codes: HB +ShowDownloadsStats=HB # Show operating systems chart # Context: Web, Streaming, Ftp @@ -1108,6 +1113,9 @@ MinHitLogin = 1 # Stats by robots MaxNbOfRobotShown = 10 MinHitRobot = 1 +# Stats for Downloads +MaxNbOfDownloadsShown = 10 +MinHitDownloads = 1 # Stats by pages MaxNbOfPageShown = 10 MinHitFile = 1 @@ -1196,6 +1204,13 @@ HTMLHeadSection="" HTMLEndSection="" +# By default AWStats page contains meta tag robots=noindex,nofollow +# If you want to have your statistics to be indexed, set this option to 1. +# Default: 0 +# +MetaRobot=0 + + # You can set Logo and LogoLink to use your own logo. # Logo must be the name of image file (must be in $DirIcons/other directory). # LogoLink is the expected URL when clicking on Logo. @@ -1259,134 +1274,64 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # Uncomment LoadPlugin lines to enable a plugin after checking that perl # modules required by the plugin are installed. -# Plugin: Tooltips -# Perl modules required: None -# Add some tooltips help on HTML report pages. -# Note that enabling this kind of help will increased HTML report pages size, -# so server load and bandwidth. +# PLUGIN: Tooltips +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: Add tooltips pop-up help boxes to HTML report pages. +# NOTE: This will increased HTML report pages size, thus server load and bandwidth. # #LoadPlugin="tooltips" -# Plugin: DecodeUTFKeys -# Perl modules required: Encode and URI::Escape -# Allow AWStats to show correctly (in language charset) keywords/keyphrases -# strings even if they were UTF8 coded by the referer search engine. +# PLUGIN: DecodeUTFKeys +# REQUIRED MODULES: Encode and URI::Escape +# PARAMETERS: None +# DESCRIPTION: Allow AWStats to show correctly (in language charset) +# keywords/keyphrases strings even if they were UTF8 coded by the +# referer search engine. # #LoadPlugin="decodeutfkeys" -# Plugin: IPv6 -# Perl modules required: Net::IP and Net::DNS -# This plugin gives AWStats capability to make reverse DNS lookup on IPv6 -# addresses. -# Note: If you are interested in having country report, you should use the -# geoip or geoipfree plugin instead of enabled reverse DNS lookup. +# PLUGIN: IPv6 +# PARAMETERS: None +# REQUIRED MODULES: Net::IP and Net::DNS +# DESCRIPTION: This plugin gives AWStats capability to make reverse DNS +# lookup on IPv6 addresses. # #LoadPlugin="ipv6" -# Plugin: HashFiles -# Perl modules required: Storable -# AWStats DNS cache files are read/saved as native hash files. This increases -# DNS cache files loading speed, above all for very large web sites. +# PLUGIN: HashFiles +# REQUIRED MODULES: Storable +# PARAMETERS: None +# DESCRIPTION: AWStats DNS cache files are read/saved as native hash files. +# This increases DNS cache files loading speed, above all for very large web sites. # LoadPlugin="hashfiles" -# Plugin: GeoIP -# Perl modules required: Geo::IP or Geo::IP::PurePerl (from Maxmind) -# Country chart is built from an Internet IP-Country database. -# This plugin is useless for intranet only log files. -# Note: You must choose between using this plugin (need Perl Geo::IP module -# from Maxmind, database is free and up to date) or the GeoIPfree plugin -# (need Perl Geo::IPfree module, database is free but not up to date). -# There is two versions of Maxmind Country Database: -# You can get a free version or purchase a license from Maxmind to get/use a more -# accurate version including updates (http://www.maxmind.com/app/perl?rId=awstat) -# This plugin reduces AWStats speed of 8% ! -# -#LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat" - -# Plugin: GeoIPfree -# Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.) -# Country chart is built from an Internet IP-Country database. -# This plugin is useless for intranet only log files. -# Note: You must choose between using this plugin (need Perl Geo::IPfree -# module, database is free but not up to date) or the GeoIP plugin (need -# Perl Geo::IP module from Maxmind, database is also free and up to date). -# Note: Activestate provide a corrupted version of Geo::IPfree 0.2 Perl -# module, so install it from elsewhere (from www.cpan.org for example). -# This plugin reduces AWStats speed of 10% ! -# -#LoadPlugin="geoipfree" - -# Plugin: GeoIP_Region_Maxmind -# Perl modules required: Geo::IP (from Maxmind) -# This plugin add a chart of hits by regions. Only regions for US and -# Canada can be detected. -# Note: This plugin need Maxmind GeoIP Perl module AND the region database. -# Note: I get some problem with Maxmind Geo::IP Perl module with ActiveState -# on Windows but it works great on Linux with default Perl. -# You need to purchase a license from Maxmind to get/use the Region database. -# This plugin reduces AWStats speed. -# -#LoadPlugin="geoip_region_maxmind GEOIP_STANDARD /pathto/GeoIPRegion.dat" - -# Plugin: GeoIP_City_Maxmind -# Perl modules required: Geo::IP (from Maxmind) -# This plugin add a chart of hits by cities (with country and regions -# informations for major countries). -# Note: This plugin need Maxmind GeoIP Perl module AND the city database. -# Note: I get some problem with Maxmind Geo::IP Perl module with ActiveState -# on Windows but it works great on Linux with default Perl. -# There is two versions of Maxmind City Database: -# You can get a free version or purchase a license from Maxmind to get/use a more -# accurate version including updates (http://www.maxmind.com/app/perl?rId=awstat) -# This plugin reduces AWStats speed. -# -#LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPCity.dat" -# Plugin: GeoIP_ISP_Maxmind -# Perl modules required: Geo::IP (from Maxmind) -# This plugin add a chart of hits by ISP. -# Note: This plugin need Maxmind GeoIP Perl module AND the ISP database. -# Note: I get some problem with Maxmind Geo::IP Perl module with ActiveState -# on Windows but it works great on Linux with default Perl. -# You need to purchase a license from Maxmind to get/use the ISP database. -# This plugin reduces AWStats speed. -# -#LoadPlugin="geoip_isp_maxmind GEOIP_STANDARD /pathto/GeoIPISP.dat" - -# Plugin: GeoIP_Org_Maxmind -# Perl modules required: Geo::IP (from Maxmind) -# This plugin add a chart of hits by Organization name -# Note: This plugin need Maxmind GeoIP Perl module AND the Org database. -# Note: I get some problem with Maxmind Geo::IP Perl module with ActiveState -# on Windows but it works great on Linux with default Perl. -# You need to purchase a license from Maxmind to get/use the Org database. -# This plugin reduces AWStats speed. -# -#LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /pathto/GeoIPOrg.dat" - -# Plugin: UserInfo -# Perl modules required: None -# Add a text (Firtname, Lastname, Office Department, ...) in authenticated user -# reports for each login value. +# PLUGIN: UserInfo +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: Add a text (Firtname, Lastname, Office Department, ...) in +# authenticated user reports for each login value. # A text file called userinfo.myconfig.txt, with two fields (first is login, # second is text to show, separated by a tab char) must be created in DirData # directory. # #LoadPlugin="userinfo" -# Plugin: HostInfo -# Perl modules required: Net::XWhois -# Add a column into host chart with a link to open a popup window that shows +# PLUGIN: HostInfo +# REQUIRED MODULES: Net::XWhois +# PARAMETERS: None +# DESCRIPTION: Add a column into host chart with a link to open a popup window that shows # info on host (like whois records). # #LoadPlugin="hostinfo" -# Plugin: ClusterInfo -# Perl modules required: None -# Add a text (for example a full hostname) in cluster reports for each cluster -# number. -# A text file called clusterinfo.myconfig.txt, with two fields (first is +# PLUGIN: ClusterInfo +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: Add a text (for example a full hostname) in cluster reports for each cluster +# number. A text file called clusterinfo.myconfig.txt, with two fields (first is # cluster number, second is text to show) separated by a tab char. must be # created into DirData directory. # Note this plugin is useless if ShowClusterStats is set to 0 or if you don't @@ -1394,43 +1339,131 @@ LoadPlugin="hashfiles" # #LoadPlugin="clusterinfo" -# Plugin: UrlAliases -# Perl modules required: None -# Add a text (Page title, description...) in URL reports before URL value. +# PLUGIN: UrlAliases +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: Add a text (Page title, description...) in URL reports before URL value. # A text file called urlalias.myconfig.txt, with two fields (first is URL, # second is text to show, separated by a tab char) must be created into # DirData directory. # #LoadPlugin="urlalias" -# Plugin: TimeHiRes -# Perl modules required: Time::HiRes (if Perl < 5.8) -# Time reported by -showsteps option is in millisecond. For debug purpose. +# PLUGIN: TimeHiRes +# REQUIRED MODULES: Time::HiRes (if Perl < 5.8) +# PARAMETERS: None +# DESCRIPTION: Time reported by -showsteps option is in millisecond. For debug purpose. # #LoadPlugin="timehires" -# Plugin: TimeZone -# Perl modules required: Time::Local -# Allow AWStats to correct a bad timezone for user of some IIS that use -# GMT date in its log instead of local server time. -# This module is useless for Apache and most IIS version. -# This plugin reduces AWStats speed of 40% !!!!!!! +# PLUGIN: TimeZone +# REQUIRED MODULES: Time::Local +# PARAMETERS: [timezone offset] +# DESCRIPTION: Allow AWStats to adjust time stamps for a different timezone +# This plugin reduces AWStats speed of 10% !!!!!!! +# LoadPlugin="timezone" +# LoadPlugin="timezone +2" +# LoadPlugin="timezone CET" # #LoadPlugin="timezone +2" -# Plugin: Rawlog -# Perl modules required: None -# This plugin adds a form in AWStats main page to allow users to see raw +# PLUGIN: Rawlog +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: This plugin adds a form in AWStats main page to allow users to see raw # content of current log files. A filter is also available. # #LoadPlugin="rawlog" -# Plugin: GraphApplet -# Perl modules required: None -# Supported charts are built by a 3D graphic applet. +# PLUGIN: GraphApplet +# REQUIRED MODULES: None +# PARAMETERS: [CSS classes to override] +# DESCRIPTION: Supported charts are built by a 3D graphic applet. # #LoadPlugin="graphapplet /awstatsclasses" # EXPERIMENTAL FEATURE +# PLUGIN: GraphGoogleChartAPI +# REQUIRED MODULES: None +# PARAMETERS: None +# DESCRIPTION: Replaces the standard charts with free Google API generated images +# in HTML reports. If country data is available and more than one country has hits, +# a map will be generated using Google Visualizations. +# Note: The machine where reports are displayed must have Internet access for the +# charts to be generated. The only data sent to Google includes the statistic numbers, +# legend names and country names. +# Warning: This plugin is not compatible with option BuildReportFormat=xhtml. +# +#LoadPlugin="graphgooglechartapi" + +# PLUGIN: GeoIPfree +# REQUIRED MODULES: Geo::IPfree version 0.2+ (from Graciliano M.P.) +# PARAMETERS: None +# DESCRIPTION: Country chart is built from an Internet IP-Country database. +# This plugin is useless for intranet only log files. +# Note: You must choose between using this plugin (need Perl Geo::IPfree +# module, database is free but not up to date) or the GeoIP plugin (need +# Perl Geo::IP module from Maxmind, database is also free and up to date). +# Note: Activestate provide a corrupted version of Geo::IPfree 0.2 Perl +# module, so install it from elsewhere (from www.cpan.org for example). +# This plugin reduces AWStats speed by up to 10% ! +# +#LoadPlugin="geoipfree" + +# MAXMIND GEO IP MODULES: Please see documentation for notes on all Maxmind modules + +# PLUGIN: GeoIP +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/geoip.dat[+/pathto/override.txt]] +# DESCRIPTION: Builds a country chart and adds an entry to the hosts +# table with country name +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat" + +# PLUGIN: GeoIP_City_Maxmind +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPCity.dat[+/pathto/override.txt]] +# DESCRIPTION: This plugin adds a column under the hosts field and tracks the pageviews +# and hits by city including regions. +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPCity.dat" + +# PLUGIN: GeoIP_ASN_Maxmind +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPASN.dat[+/pathto/override.txt][+http://linktoASlookup]] +# DESCRIPTION: This plugin adds a chart of AS numbers where the host IP address is registered. +# This plugin can display some ISP information if included in the database. You can also provide +# a link that will be used to lookup additional registration data. Put the link at the end of +# the parameter string and the report page will include the link with the full AS number at the end. +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip_asn_maxmind GEOIP_STANDARD /usr/local/geoip.dat+http://enc.com.au/itools/aut-num.php?autnum=" + +# PLUGIN: GeoIP_Region_Maxmind +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPRegion.dat[+/pathto/override.txt]] +# DESCRIPTION:This plugin adds a chart of hits by regions. Only regions for US and +# Canada can be detected. +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip_region_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPRegion.dat" + +# PLUGIN: GeoIP_ISP_Maxmind +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPISP.dat[+/pathto/override.txt]] +# DESCRIPTION: This plugin adds a chart of hits by ISP. +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip_isp_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPISP.dat" + +# PLUGIN: GeoIP_Org_Maxmind +# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind) +# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPOrg.dat[+/pathto/override.txt]] +# DESCRIPTION: This plugin add a chart of hits by Organization name +# Replace spaces in the path of geoip data file with string "%20". +# +#LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPOrg.dat" #----------------------------------------------------------------------------- diff --git a/awstats.olinda.conf b/awstats.olinda.conf index 29a3a48..5ec446f 100644 --- a/awstats.olinda.conf +++ b/awstats.olinda.conf @@ -1,7 +1,7 @@ # AWSTATS CONFIGURE FILE 6.8 -Include "awstats.conf" +Include "awstats.conf.distrib" LogFile="/var/log/apache2/access.olinda.log" -SiteDomain="olinda.mit.edu" -HostAliases="localhost 127.0.0.1 olinda.mit.edu www.dehnerts.com www.dehnert.arctic.org olinda.dehnerts.com olinda.dehnert.arctic.org" +SiteDomain="olinda.dehnerts.com" +HostAliases="localhost 127.0.0.1 olinda.mit.edu (www|olinda).dehnert(s.com|.arctic.org)" diff --git a/cron-script.sh b/cron-script.sh index f3ddf1c..032509b 100755 --- a/cron-script.sh +++ b/cron-script.sh @@ -4,6 +4,7 @@ set -e domains="olinda alex" if [ ! -x /usr/lib/cgi-bin/awstats.pl ]; then exit 1; fi +cd /etc/awstats/ for domain in $domains; do echo "Updating $domain..." -- 2.34.1