\n";
}
#------------------------------------------------------------------------------
# Function: Scan directory $dir for config file. Return an array with full path
#------------------------------------------------------------------------------
sub scan_config_dir
{
my $dir=shift;
opendir(DIR, $dir) || return;
local @rv = grep { /^awstats\.(.*)conf$/ } sort readdir(DIR);
closedir(DIR);
foreach my $file (0..@rv-1) {
if ($rv[$file] eq 'awstats.model.conf') { next; }
$rv[$file]="$dir/".$rv[$file];
#print "$rv[0]\n ";
}
return @rv;
}
#------------------------------------------------------------------------------
# Function: can_edit_config
#------------------------------------------------------------------------------
sub can_edit_config
{
foreach $d (split(/\s+/, $access{'dir'})) {
local $ok = &is_under_directory($d, $_[0]);
return 1 if ($ok);
}
return 0;
}
1;
awstats/awstats-webmin_changelog.txt 0100777 0001757 0001001 00000004346 10172230465 017543 0 ustar Laurent Aucun AWStats-Webmin module Changelog
-------------------------------
$Revision: 1.17 $ - $Author: eldy $ - $Date: 2005/01/15 15:05:25 $
1.400
New features/improvements:
- Some change to add scheduler management for update process.
- Creating new config files can be done by copying an old one.
- Add a page for a summary of all config files on same pages.
- Added a row number on each row of index page.
- Translation more complete.
- Report GeoIP country, regions, city, isp and organizations versions.
1.300
New features/improvements:
- Added a warning to explain to add '/private/etc' to webmin ACL for
MacOS users.
- A first screen for the schedule update feature.
- Better description for ACL page.
Fixes:
- Translation was in french for some texts, whatever was choosed language.
1.210
New features/improvements:
- Added following parameters parameter in edit config area:
BuildHistoryFormat
BuildReportFormat
LevelForFileTypesDetection
LevelForWormsDetection
URLWithQueryWithOnlyFollowingParameters
ShowWormsStats
- Removed LinkToIPWhoIs and LinkToWhoIs obsolete parameters.
- Module setup parameter awstats_conf has been removed since now
directories into wich you can scan/edit AWStats configuration files
are defined in ACL users. Defined to /etc/awstats by default.
Also added a link the the ACL page to edit this directory listing.
- Added a streaming server log file type.
Fixes:
- Better error messages
- Fixed ACL management on directory that contains config files.
Other/Documentation:
- Added german translation.
1.100
New features/improvements:
- All AWStats config parameters can be edited.
- Added management of plugins
- Added a file/dir selector for parameters that are files or directories.
- Added javascript test in edit config pages.
- Added a check that LogFile used with maillogconvert.pl has a 'Mail' type.
Fixes:
- Modify of old config files add the new parameters if not found.
- Fixed wrong value saved for LogSeparator parameter.
- Better check of old versions incompatibility.
- Fix help page for parameters not found in model config file.
- Fixed check of logfile for piped values.
- Minor bug fixes.
Other/Documentation:
- Added French translation.
- Removed unused files.
1.000
- First release version.
awstats/config 0100555 0001757 0001001 00000000216 07754050072 013206 0 ustar Laurent Aucun awstats=/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
awstats_cgi=http://127.0.0.1/awstats/awstats.pl
alt_conf=/etc/awstats/awstats.model.conf awstats/config.info 0100777 0001757 0001001 00000001741 10155335215 014144 0 ustar Laurent Aucun awstats=Absolute filesystem path to AWStats (CLI),0
awstats_cgi=Absolute or relative URL path to AWStats (CGI),0
alt_conf=Sample AWStats configuration file,3,/etc/awstats/awstats.model.conf
plugin_1_geoip=Path for GeoIP country database file (if AWStats geoip plugin is enabled),3,/usr/local/share/GeoIP/GeoIP.dat
plugin_2_geoip_region_maxmind=Path for GeoIP region database file (if AWStats geoip_region_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPRegion.dat
plugin_3_geoip_city_maxmind=Path for GeoIP city database file (if AWStats geoip_city_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPCity.dat
plugin_4_geoip_isp_maxmind=Path for GeoIP isp database file (if AWStats geoip_isp_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPISP.dat
plugin_5_geoip_org_maxmind=Path for GeoIP org database file (if AWStats geoip_org_maxmind plugin is enabled),3,/usr/local/share/GeoIP/GeoIPOrg.dat
awstats/defaultacl 0100555 0001757 0001001 00000000114 07754032770 014047 0 ustar Laurent Aucun noconfig=0
view=1
update=1
dir=/etc/awstats ~/awstats
user=*
global=1
add=1
awstats/edit_config.cgi 0100777 0001757 0001001 00000141147 10156402203 014756 0 ustar Laurent Aucun #!/usr/bin/perl
# edit_config.cgi
# Display a form for adding a new config or editing an existing one.
require './awstats-lib.pl';
&ReadParse();
if (! $access{'global'}) { &error($text{'edit_ecannot'}); }
my $filecontent="";
my $filetoopen="";
if ($in{'new'}) {
$filetoopen=$config{'alt_conf'};
}
else {
$filetoopen=$in{'file'};
}
if ($in{'new'}) {
$access{'add'} || &error($text{'edit_ecannot'});
&header($text{'edit_title1'}, "");
}
else {
&can_edit_config($in{'file'}) || &error($text{'edit_ecannot'});
&header($text{'edit_title2'}, "");
}
# Get parameters
$lconf = &get_config($filetoopen);
foreach my $key (keys %$lconf) {
$lconf->{$key}=~s/^\s*//g;
$lconf->{$key}=~s/^*[\"\']//;
$lconf->{$key}=~s/#.*$//;
$lconf->{$key}=~s/\s*$//g;
$lconf->{$key}=~s/[\"\']\s*$//;
}
# Put in @conflist, list of all existing config
my @conflist=();
foreach my $dir (split(/\s+/, $access{'dir'})) {
push(@conflist, map { $_->{'custom'} = 1; $_ } &scan_config_dir($dir));
}
print "\n";
print <
function Submit_onClick() {
EOF
# If create
if ($in{'new'} && scalar @conflist) {
print < 1) ? argv[1] : 640;
var h = (argc > 2) ? argv[2] : 450;
var wfeatures="directories=0,menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,width="+l+",height="+h+",left=" + eval("(screen.width - l)/2") + ",top=" + eval("(screen.height - h)/2");
fen=window.open(tmp,'window',wfeatures);
}
EOF
if (-d "/private/etc" && ! &can_edit_config("/private/etc")) { # For MacOS users
print "Warning: It seems that you are a MacOS user. With MacOS, the '/etc/awstats' directory is not a hard directory but a link to '/private/etc/awstats' which is not by default an allowed directory to store config files, so if you want to store config files in '/etc/awstats', you must first change the Webmin ACL for AWStats module to add '/private/etc' in the allowed directories list: \n";
print &text('index_changeallowed',"Webmin - Webmin Users", $text{'index_title'})." \n";
}
print "\n";
# Back to config list
print "\n";
&footer("", $text{'index_return'});
awstats/geoip_info.cgi 0100777 0001757 0001001 00000003531 10165615542 014630 0 ustar Laurent Aucun #!/usr/bin/perl
# geoip_info.cgi
# Report geoip informations
require './awstats-lib.pl';
&ReadParse();
if (! $access{'update'}) { &error($text{'geoip_cannot'}); }
my $conf=""; my $dir="";
if ($in{'file'} =~ /awstats\.(.*)\.conf$/) { $conf=$1; }
if ($in{'file'} =~ /^(.*)[\\\/][^\\\/]+$/) { $dir=$1; }
# Display file contents
&header($title || $text{'geoip_title'}, "");
print "\n";
my $type=$in{'type'};
my $size=-1;
print "GeoIP information for file ".$in{'file'}."
\n";
# Try to get the GeoIP data file version at end of file
if (-f "$in{'file'}") {
my @st=stat($in{'file'});
my $size = $st[7];
my ($sec,$min,$hour,$day,$month,$year,$wday,$yday) = localtime($st[9]);
$year+=1900; $month++;
print "Geoip data file type: $type \n";
print "Geoip data file size: $size bytes \n";
printf("Geoip data file date: %04s-%02s-%02s %02s:%02s:%02s \n",$year,$month,$day,$hour,$min,$sec);
my $version='unknown';
# Try to get version from API
# Try to get version from file
if (! $version || $version eq 'unknown') {
if (open(GEOIPFILE,"<$in{'file'}")) {
my $seekpos=($size-100);
if ($seekpos < 0) { $seekpos=0; }
binmode GEOIPFILE;
seek(GEOIPFILE,$seekpos,0);
my $nbread=0;
while (($nbread < 100) && ($line=)) {
$nbread++;
if ($line =~ /(Geo-.*)Copyright/i) {
$version=$1;
last;
}
}
close (GEOIPFILE);
}
}
print "Geoip data file version: $version \n";
} else {
print "GeoIP datafile $in{'file'} does not exist or can not be read. \n";
}
print " \n";
# Back to config list
print "\n";
&footer("", $text{'index_return'});
0;
awstats/help.cgi 0100555 0001757 0001001 00000003045 07733452170 013437 0 ustar Laurent Aucun #!/usr/bin/perl
# help.cgi
# Show help for a config parameter
require './awstats-lib.pl';
&ReadParse();
# Display file contents
&header($title || $text{'help_title'}, "", undef, 0, 1, 1);
print "\n";
my $helpparam=$in{'param'};
my $isplugin=0;
if ($helpparam =~ s/^plugin_//) { $isplugin=1; }
if ($isplugin) { print &text('help_subtitleplugin',$helpparam)."