awstats interview questions
Top awstats frequently asked interview questions
I was just reading that there is a feature in AWStats that can estimate how many users have added your site to their favorites/bookmarks. How does this work considering that AwStats is just a log analyzer?
Source: (StackOverflow)
This seems ridiculous to me, but AWStats is not configured to count exe or dmg files as downloads. What config file or setting can I change? I tried looking through the documentation but found no mention of anything pertaining to Downloads.
I did find out to add another download section containing my file types here http://antezeta.com/news/awstats, but neither the hits or bandwidth calculations are even close to being correct.
Source: (StackOverflow)
I have AWStats provided my hosting service provider. I have google analytics as well setup. But both show different statistics whom should I trust? Whats more accurate of these two? Should I use something else for getting accurate statistics.
Source: (StackOverflow)
Has anyone tried to use Awstats for generating usage statistics for a Liferay portal?
Can you share your experience on how to do it?
Aside from Awstats and Google Analytics, are there any other alternatives for generating statistics for a Liferay portal? (I can't use Google Analystics since it's a restricted internal portal)
Source: (StackOverflow)
does anyone ever heard of a tool/script/etc. which allows to import an AWStats created logfile ( e.g. as text or xml ) into a SQL-DB?
I just want to figure out if i really have to write a parser-script myself...
thanks.
Source: (StackOverflow)
Hi I have configured Awstats on my ubuntu machine to analyze nginx access logs and the problem is Awstats gives me report only for the present day i want to analyze the previous months logs also and i have combine all logs to a single file and ran the update script still i dnt get the report for the previous months, i checked the log files the data for the previous months are in avilable what am i doing wrong
Source: (StackOverflow)
AWStats 7 shows two rows under download: hits and now 206 hits.
I understand that 206 are partial downloads (e.g. when using a download manager).
Here are some sample results:
- fileA.pdf - 23 hits, 38 206 hits
- fileB.pdf - 5 hits, 4 206 hits
- fileC.pdf - 1 hit, 0 206 hits
What I don't understand is if the file was downloaded the sum of both hits, or just the hits:
e.g. was fileA.pdf downloaded 23 times, or 61 times?
Source: (StackOverflow)
I am using AWStats on windows server (IIS7)
Everting is working fine but when I click the Update Now link which takes me to the next page where I am hit with this error:
Error: Couldn't open server log file "C:\HostingSpaces\domain.com\logs\W3SVC8\u_ex130520.log" : Permission denied
Setup ('C:\home\AWStats\cgi-bin/awstats.www.domain.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
There are a number of log files, one for each day in this folder W3SVC8.
I have tried adding permission to the logs directory but it didn't work.
What do I have to do to get this working?
Source: (StackOverflow)
I am trying to run awstats on windows 7 with apache from xammp tools. but i get this error, when i click on "update" from the website:
Error: Couldn't open server log file "C:\Users\ekc\Documents\Projekte\16 Lasttests\Access Logs\s96ess5a1" : Permission denied
Setup ('C:/xampp/cgi-bin/awstats.www.testmywebsite.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
But if i set my LogFile= in awstats.www.testmywebsite.com.conf direkt to log file self instead of to the folder of log, it works! I mean, if i use ..\Access Logs\s96ess5a1\2015-02-01 instead of ..\Access Logs\s96ess5a1
I have set all of the permissions with right click on this folder for my user, to write and to change the folder.
What is the reason of that?
Source: (StackOverflow)
On my server I am running awstats, a script that I can currently access via the following URL:
https://stats.example.com/bin/awstats.pl/?config=global
I am trying to use rewrite rules such that I can just use
https://stats.example.com/global
This is what I have defined for a rewrite rule
RewriteRule ^(.*)$ bin/awstats.pl/?config=$1 [NC,L]
httpd virtual host
# Address
ServerName stats.example.com
# Rewrite
RewriteRule ^(.*)$ bin/awstats.pl/?config=$1 [NC,L]
Options ExecCGI
AddHandler cgi-script .cgi .pl
Alias /awstatsstuff "/path/to/awstatsstuff/"
<Directory "/path/to/awstatsstuff">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
The problem is that anything I try and access (besides the index), will give me a 400, and my apache logs show no errors.
Should this rule be working correctly, do I have a different configuration issue? Or am I missing something? Yes, RewriteEngine
is on.
edit
Based on Michael Berkowski's comment I determined that is is infact an issue with resources also being directed to the pl script, I have since modified and am using the following:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/([0-9a-z]+\.[0-9a-z]+\.[0-9a-z]+)$ bin/awstats.pl/?config=$1 [NC,L]
I can now load the page again using
https://stats.example.com/bin/awstats.pl/?config=www.example.com
This means that all resources can be loaded correctly, however
https://stats.example.com/www.exmaple.com
will return a 400 ( this does not come from the pl script which will return a 200 and error message if the specified config file can not be found, again, no error messages in the logs.
another edit
In changing [NC,L]
to [R=302]
, I am provided with the correct redirect upon request,
curl -k "https://stats.example.com/a.b.c"
...
<p>The document has moved <a rel='nofollow' href="https://stats.example.com/bin/awstats.pl/?config=a.b.c">here</a>.</p>
...
Using [R=403]
proves that the rewrite rule is working as expected
The problem that I am now facing is that when using [NC,L]
, I am still receiving a 400
, with no errors available in the httpd log.
Source: (StackOverflow)
I have this script that runs via a cron job once a month to send out awstats reports to clients. We've had to modify it recently because of tightening restrictions on our outbound mail server. Unfortunately some recipients are receiving the report as raw html code in the body of the message. Can anyone tell from the script where I went wrong?
##########################
## Call to get awstats
##########################
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"http://www.$your_domain:2082/awstats.pl"
."?month=$report_month&year=$report_year&output=main&config=$your_domain"
."&lang=en&framename=mainright");
curl_setopt($curl, CURLOPT_USERPWD, "$user:$password");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
//$attachment = curl_exec($curl);
$attachment = "<br /><br /><div align=\"center\"><a rel='nofollow' href=\"$logo_link\"><img src=\"$logo_path\" border=\"0\" /></a>\n";
$attachment .= "<br /><font color=\"#FF0000\"><b>AwStats Report for $your_domain ($report_monthname $report_year)</b></font></div>\n";
$attachment .= "<base rel='nofollow' href=\"$awstats_img_path\">\n";
$attachment .= curl_exec($curl);
curl_close($curl);
##########################
## Call to send email
##########################
$subject = "AwStats Report for $your_domain ($report_monthname $report_year)";
$header = "From: " . $email_from . " <" . $email_from . ">\n";
$header .= "Reply-To: " . $email_from . "\n";
$header .= "MIME-Version: 1.0\n";
$header .= "Content-Type: multipart/mixed; boundary=\"" . $uid . "\"\n\n";
$uid = md5(uniqid(time()));
$message = "--" . $uid . "\n";
$message .= "Content-type:text/html; charset=iso-8859-1\n";
$message .= "Content-Transfer-Encoding: 7bit\n\n";
$message .= $attachment . "\n\n";
mail($email_to, $subject, $message, $header);
I've obviously left out the variable declarations here. But they are all in the code. I actually receive a cc of the message and it displays fine in Apple Mail on the desktop.
Thanks,
CJ
Source: (StackOverflow)
I have my Apache configure with logfomat in combined pattern:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
This sample out from result log:
192.168.201.156 - - [02/Feb/2013:00:00:10 -0430] "GET /conseme/styles/datePicker.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/calendario.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/windows_modal.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/confirm.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/js/jquery/jquery.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/js/jquery/jquery.min.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/calendario/date.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/calendario/jquery.datepicker.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/jquery.maskedinput.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/Validador.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/3/BOTPAGO/50/50.10/opcion.do HTTP/1.1" 200 1837 "http://myserver.com.com:49004/portalasegurado/menu.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/styles/style.css HTTP/1.1" 200 1228 "http://myserver.com.com:49004/portalasegurado/3/BOTPAGO/50/50.10/opcion.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/validation.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/js/jquery/jquery.min.js HTTP/1.1" 200 26048 "http://myserver.com.com:49004/portalasegurado/3/BOTPAGO/50/50.10/opcion.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/interfaz.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
The logformat for awstats is same as the config file sample:
LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
This match perfect with apache output and the ACCURACY SETUP SECTION (robots, browsers, os, referers, file types) detection have value 2 for each property. I try test with LevelForBrowsersDetection=allphones and no work for mobile browsers detection
I run awstats.pl to build database:
perl C:\mysoft\awstats-7.1\wwwroot\cgi-bin\awstats.pl -config=www.myserver.com -lang=en -staticlinks -update -month=2 -year=2013 ^
LogFile="C:\mysoft\awstats-7.1\tools\logresolvemerge.pl -showsteps C:\temp\awstats\log\2013\02\* |"
Next run builstatic_pages to generate html full report
perl C:\mysoft\awstats-7.1\tools\awstats_buildstaticpages.pl -awstatsprog=C:\mysoft\awstats-7.1\wwwroot\cgi-bin\awstats.pl ^
-config=www.myserver.com -lang=en -staticlinks -output -month=2 -year=2013 -dir=.\stats\2013\02 1>awstats_buildstaticpages_last_execution.log
All this run OK but in the Main HTML page the sections:
- OS: only show Unknown
- Browsers: no detect mobile/phones and versions, show Unknown for all diference to IE, Safari, Chrome, FF and Opera.
- Links from an Internet Search Engine: is empty. Look at the log and there are references from Google and others.
- Search Keyphrases: empty
- Search Keywords: empty
My system enviroment is:
- Windows 7 64b and test on Windows Server 2003 32b
- ActivePerl-5.16.2.1602-MSWin32-x86-296513
- Awstats-7.1
I try to find on internet issues related unsuccessfully.
Please let me know any idea, is important for my the mobile browsers and OS family/types.
Thanks
Source: (StackOverflow)
About six months ago, I have moved a website to a new domain, and helped migration using 301 redirects into .htaccess of the old domain.
This morning I was looking at AwStats log of the new domain, and was surpised to notice that in the "HTTP Status codes"section, 301 redirects score 77% of the whole codes (seems 200 are not tracked here).
So, what is the proper meaning of the 301 code in those stats? Does it mean that 77% of traffic is incoming (referrer) from 301 redirects or?
Source: (StackOverflow)
I've download latest ActivePerl and configured Web Site Extensions along with script mappings with .pl extension for target site in IIS 6.
Also did the exact same in IIS 7.5 and it worked.
The script I'm trying to execute is very simple "Hello World" first and then configure AWStats, which I'm also able to do in IIS 7.5 with no issues..
I'm hoping someone can point me in the right direction..
Thanks
D
Source: (StackOverflow)
As of recently when I look at my web statistics through AWStats, I see several things that concern me. The first is 'Unknown robot' listed under the 'Robots/spiders visitors' tab. The second, and most concerning line is 'A PHP script' under the same AWStats robots tab. I run content on my site that should not be fetched by other site's PHP scripts. Is there any way to log this in Apache logs? In other words, how can I tell if the script is being called by a PHP script (through logs or PHP functions)? Lastly, an image is listed below that shows what I'm describing. As you can see, hits from a normal bot - Googlebot - number in the hundreds whereas the hits from the 'Unknown robots' number roughly 700 thousand.

Source: (StackOverflow)