From: eldy <>
Date: Tue, 24 Sep 2002 14:15:16 +0000 (+0000)
Subject: Added DecodeUA parameter for Roxen servers.
X-Git-Tag: AWSTATS_5_0_BETA~3
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b4dda6eb5a21cf3dc9d5d1fd8862592858d7b95;p=thirdparty%2FAWStats.git
Added DecodeUA parameter for Roxen servers.
Added EnableLockForUpdate parameter (not enabled by default)
---
diff --git a/docs/awstats_config.html b/docs/awstats_config.html
index 7ba999c7..c85c277a 100644
--- a/docs/awstats_config.html
+++ b/docs/awstats_config.html
@@ -61,6 +61,7 @@ when reading it), follow the example:
OPTIONAL SETUP SECTION (Not required but increase AWStats features)
OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)
@@ -393,6 +395,23 @@ when reading it), follow the example:
+EnableLockForUpdate
+Version : 5.0 +
+
# When the update process run, AWStats can set a lock file in TEMP or TMP
+
# directory. This lock is to avoid to have 2 update processes running at the
+
# same time to prevent unknown conflicts problems and avoid DoS attacks when
+
# AllowToUpdateStatsFromBrowser is set to 1.
+
# Because, when you use lock file, you can experience sometimes problems in
+
# lock file not correctly removed (when process is killed for example that
+
# require that you remove the file manualy), this option is not enabled by
+
# default (Do not enable this option with no consol server access).
+
# Possible values: 0 or 1
+
# Default: 0
+
#
+
EnableLockForUpdate=0
+
+
+
DNSStaticCacheFile
Version : 5.0 +
# AWStats can do reverse DNS lookups through a static DNS cache file that was
@@ -770,18 +789,29 @@ AWStats 4.1+ supports both keywords AND keyphrases by default with no need of an
+DecodeUA
+Version : 5.0 +
+
# DecodeUA must be set to 1 if you use Roxen web server. This server converts
+
# all spaces in user agent field into %20. This make the AWStats robots, os
+
# and browsers detection fail in some cases. Just change it to 1 if and only
+
# if your web server is Roxen.
+
# Possible values: 0 or 1
+
# Default: 0
+
#
+
DecodeUA=0
+
+
+
LevelFor
Version : 4.0 +
-
# You can change value for following option to disable/enable AWStats capabilities.
-
# Possible values: 0, 1
-
# Possible values: 0, 1 or 2 for LevelForRobotsDetection
-
# Default: 1
-
# Default: 2 for LevelForRobotsDetection
+
# Following values allows you to disable/enable some AWStats features.
+
# Possible values: 0, 1 (or 2 for LevelForRobotsDetection)
+
# Default: 1 (2 for LevelForRobotsDetection)
#
LevelForRobotsDetection=2 # 0 will increase AWStats speed by 1%.
LevelForBrowsersDetection=1 # 0 disables Browsers detection. No speed gain.
LevelForOSDetection=1 # 0 disables OS detection. No speed gain.
-
LevelForRefererAnalyze=1 # 0 will increase AWStats speed by 6%.
+
LevelForRefererAnalyze=1 # 0 will increase AWStats speed by 5%.
diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf
index f0798535..f95fbe70 100644
--- a/wwwroot/cgi-bin/awstats.model.conf
+++ b/wwwroot/cgi-bin/awstats.model.conf
@@ -186,7 +186,7 @@ HostAliases="www.myserver.com x.y.z.w localhost 127.0.0.1"
# browser errors if you don't launch AWStats enough frequently.
# When set to 0, update is only made when AWStats is ran from the command
# line interface (or a task scheduler).
-# Possible values: 1 or 0
+# Possible values: 0 or 1
# Default: 0
#
AllowToUpdateStatsFromBrowser=0
@@ -197,6 +197,20 @@ AllowToUpdateStatsFromBrowser=0
# OPTIONAL SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------
+# When the update process run, AWStats can set a lock file in TEMP or TMP
+# directory. This lock is to avoid to have 2 update processes running at the
+# same time to prevent unknown conflicts problems and avoid DoS attacks when
+# AllowToUpdateStatsFromBrowser is set to 1.
+# Because, when you use lock file, you can experience sometimes problems in
+# lock file not correctly removed (when process is killed for example that
+# require that you remove the file manualy), this option is not enabled by
+# default (Do not enable this option with no consol server access).
+# Possible values: 0 or 1
+# Default: 0
+#
+EnableLockForUpdate=0
+
+
# AWStats can do reverse DNS lookups through a static DNS cache file that was
# previously created manually. If no path is gave in static DNS cache file
# name, AWStats will search DirData directory. This file is never changed.
@@ -444,21 +458,29 @@ NbOfLinesForCorruptedLog=50
WrapperScript=""
+# DecodeUA must be set to 1 if you use Roxen web server. This server converts
+# all spaces in user agent field into %20. This make the AWStats robots, os
+# and browsers detection fail in some cases. Just change it to 1 if and only
+# if your web server is Roxen.
+# Possible values: 0 or 1
+# Default: 0
+#
+DecodeUA=0
+
+
#-----------------------------------------------------------------------------
# OPTIONAL ACCURACY SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------
-# You can change value for following option to disable/enable AWStats capabilities.
-# Possible values: 0, 1
-# Possible values: 0, 1 or 2 for LevelForRobotsDetection
-# Default: 1
-# Default: 2 for LevelForRobotsDetection
+# Following values allows you to disable/enable some AWStats features.
+# Possible values: 0, 1 (or 2 for LevelForRobotsDetection)
+# Default: 1 (2 for LevelForRobotsDetection)
#
LevelForRobotsDetection=2 # 0 will increase AWStats speed by 1%.
LevelForBrowsersDetection=1 # 0 disables Browsers detection. No speed gain.
LevelForOSDetection=1 # 0 disables OS detection. No speed gain.
-LevelForRefererAnalyze=1 # 0 will increase AWStats speed by 6%.
+LevelForRefererAnalyze=1 # 0 will increase AWStats speed by 5%.
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 6fac4898..e2919081 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -94,8 +94,8 @@ $BarImageHorizontal_h = "barrehh.png";
$BarImageVertical_k = "barrevk.png";
$BarImageHorizontal_k = "barrehk.png";
use vars qw/
-$DNSLookup $AllowAccessFromWebToAuthenticatedUsersOnly $BarHeight $BarWidth
-$CreateDirDataIfNotExists $KeepBackupOfHistoricFiles $MaxLengthOfURL
+$EnableLockForUpdate $DNSLookup $AllowAccessFromWebToAuthenticatedUsersOnly
+$BarHeight $BarWidth $CreateDirDataIfNotExists $KeepBackupOfHistoricFiles $MaxLengthOfURL
$MaxNbOfDomain $MaxNbOfHostsShown $MaxNbOfKeyphrasesShown $MaxNbOfKeywordsShown
$MaxNbOfLoginShown $MaxNbOfPageShown $MaxNbOfRefererShown $MaxNbOfRobotShown
$MinHitFile $MinHitHost $MinHitKeyphrase $MinHitKeyword
@@ -105,10 +105,10 @@ $NbOfLinesShowsteps $NewLinePhase $NbOfLinesForCorruptedLog $PurgeLogFile
$ShowAuthenticatedUsers $ShowCompressionStats $ShowFileSizesStats
$ShowDropped $ShowCorrupted $ShowUnknownOrigin $ShowLinksToWhoIs
$ShowEMailSenders $ShowEMailReceivers
-$Expires $UpdateStats $MigrateStats $URLWithQuery $UseFramesWhenCGI $Spec
+$Expires $UpdateStats $MigrateStats $URLWithQuery $UseFramesWhenCGI $DecodeUA
/;
-($DNSLookup, $AllowAccessFromWebToAuthenticatedUsersOnly, $BarHeight, $BarWidth,
-$CreateDirDataIfNotExists, $KeepBackupOfHistoricFiles, $MaxLengthOfURL,
+($EnableLockForUpdate, $DNSLookup, $AllowAccessFromWebToAuthenticatedUsersOnly,
+$BarHeight, $BarWidth, $CreateDirDataIfNotExists, $KeepBackupOfHistoricFiles, $MaxLengthOfURL,
$MaxNbOfDomain, $MaxNbOfHostsShown, $MaxNbOfKeyphrasesShown, $MaxNbOfKeywordsShown,
$MaxNbOfLoginShown, $MaxNbOfPageShown, $MaxNbOfRefererShown, $MaxNbOfRobotShown,
$MinHitFile, $MinHitHost, $MinHitKeyphrase, $MinHitKeyword,
@@ -118,8 +118,8 @@ $NbOfLinesShowsteps, $NewLinePhase, $NbOfLinesForCorruptedLog, $PurgeLogFile,
$ShowAuthenticatedUsers, $ShowCompressionStats, $ShowFileSizesStats,
$ShowDropped, $ShowCorrupted, $ShowUnknownOrigin, $ShowLinksToWhoIs,
$ShowEMailSenders, $ShowEMailReceivers,
-$Expires, $UpdateStats, $MigrateStats, $URLWithQuery, $UseFramesWhenCGI, $Spec)=
-(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+$Expires, $UpdateStats, $MigrateStats, $URLWithQuery, $UseFramesWhenCGI, $DecodeUA)=
+(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
use vars qw/
$AllowToUpdateStatsFromBrowser $ArchiveLogRecords $DetailedReportsOnNewWindows
$FirstDayOfWeek $KeyWordsNotSensitive $SaveDatabaseFilesWithPermissionsForEveryone
@@ -565,8 +565,8 @@ sub error {
if ($HTMLOutput) { print "
\n"; }
print "See AWStats documentation in 'docs' directory for informations on how to setup $PROG.\n";
}
- # Remove lock if set
- if ($DirLock && $message !~ /lock file/) {
+ # Remove lock if not a lock message
+ if ($EnableLockForUpdate && $message !~ /lock file/) {
&Lock_Update(0);
}
if ($HTMLOutput) { print "