![]() ![]()
# %HH-n is replaced with hour we were n hours ago # ?-n is replaced with day we were n hours ago # %MO-n is replaced with 3 letters month we were n hours ago # %MM-n is replaced with 2 digits month we were n hours ago # %YY-n is replaced with 2 digits year we were n hours ago # %YYYY-n is replaced with 4 digits year we were n hours ago # depending on date or time (Replacement is made by AWStats at the beginning ![]() # You can also use tags in this filename if you need a dynamic file name #Awstats error.log full# Possible values: A full path, or a relative path from directory. # "LogFile" contains the web, ftp or mail server log file to analyze. # MAIN SETUP SECTION (Required to make AWStats work) # the config value in an AWStats running session and can be used like others. # Note that environment variable AWSTATS_CURRENT_CONFIG is always defined with # it with its value when reading it), follow the example: # To include an environment variable in any parameter (AWStats will replace # Unix/Linux) or same directory than (Windows, Mac, Unix/Linux.) # The config file must be in /etc/awstats, /usr/local/etc/awstats or /etc (for # to setup AWStats (See documentation in docs/ directory). # Copy this file into awstats.and edit this new config file This is a copy of the file initialized and delivered with the Awstats Debian package: /etc/awstats/nf, adapted with tags to replace : #DOMAINAANALYSER#, #ACCESSLOG#, #ALIAS#. (Ex: Monitoring robots, etc…) File /ressources/nf You can add the list of “referer” domains to be blacklisted when collecting data. Sed -i "s/#ACCESSLOG#/$ACCESSLOG/g" "$RESS_1"Įcho " La configuration de ce site existe déjà"Įcho " File /resources/referer.blacklistĮmpty content, but this file is necessary because it is included in the “awstats” configuration deployed by the “installawstats-Debian” robot. ![]() Sed -i "s/#DOMAINAANALYSER#/$DOMAINAANALYSER/g" "$RESS_1" #RESS referer.blacklist /tmp/referer.blacklistīLACKREFERERFILE="/etc/awstats/referer.blacklist"ĪWDOMAINFILE="/etc/awstats/awstats.$nf" Name of the robot : installawstats-site Fichier /script.mtya #CHECK DOMAINAANALYSER Options ExecCGI -MultiViews SymLinksIfOwnerMatchĪlias /awstats-icon/ /usr/share/awstats/icon/Īutomaton for installing the AWSTATS website configuration file (see robots) ScriptAliasMatch ^/awstats\.pl$ /usr/lib/cgi-bin/ If thenĮcho " La configuration awstats existe déjà" usr/bin/htpasswd -b -c $HTPASSWD admin $PASSWORD # Get apg password root and mainuser (pi)Įcho " Génération des mots de passe (admin accès web awstats)" #Awstats error.log installSed -i "s/#DOMAINAWSTATS#/$DOMAINAWSTATS/g" $RESS_1Įcho " Installation du paquet DEBIAN : apt - générateur aléatoire de mot de passe"Īpt-get -y install apg > /dev/null 2>/dev/null Name of the robot : installawstats-Debian /script.mtya #CHECK DOMAINAWSTATSĪWAPACHECONF=/etc/apache2/sites-available/nfĪpt-get -y install apache2 awstats libgeoip1 libgeoip-dev AWSTATS installation robot (see Mytinydc-automation) The AWSTATS Debian package automatically installs the cron file: /etc/etc/cron.d/awstats, which performs the data collection every 10 minutes. usr/bin/perl /usr/lib/cgi-bin/ -update -config= This process can be started manually by the command: #Awstats error.log manualData collection and statistics calculation Manual method #Awstats error.log updateThe Debian awstats package includes the file /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh which starts the update of statistics before log rotation. Log rotation (logrotate)ĭata collection must be done before the automatic logs are rotated, otherwise you will lose data. You can find all awstat configuration directives on the official website. It’s necessary to create the configuration for the website to be analyzed: Target domain, location of the access.log file, as well as its domain Aliases (e.g. The AWSTATS script is a program written in Perl, executed by the apache2 server. ) and build the related Apache virtualhost. (**) Translated with AWSTATS and GeoIP perl installation apt-get install apache2 awstats libgeoip1 libgeoip-devĭetermine the domain name that will be used to consult the statistics (e.g. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |