Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 297
- Log:
Updated to AWStats 7.0.
- Author:
- rool
- Date:
- Fri Mar 18 13:33:29 +0000 2011
- Size:
- 25210 Bytes
- Properties:
- Property svn:executable is set
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | <html> |
3 | <head> |
4 | <meta name="description" content="AWStats Documentation - Setup page"> |
5 | <meta name="keywords" |
6 | content="awstats, awstat, setup, config, install"> |
7 | <meta name="robots" content="index,follow"> |
8 | <meta name="title" content="AWStats Documentation - Setup page"> |
9 | <title>AWStats Documentation - Setup page</title> |
10 | <link rel="stylesheet" href="styles.css" type="text/css"> |
11 | <!-- $Revision: 1.83 $ - $Author: eldy $ - $Date: 2010/06/22 21:35:24 $ --> |
12 | </head> |
13 | <body topmargin="10" leftmargin="5"> |
14 | <table |
15 | style="font-family: arial,helvetica,verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" |
16 | bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" |
17 | width="100%"> |
18 | <!-- Large --> <tbody> |
19 | <tr |
20 | style="font-family: arial,helvetica,verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> |
21 | <td align="center" bgcolor="#9999cc"><a href="/"><img |
22 | src="images/awstats_logo4.png" border="0"></a></td> |
23 | <td align="center" bgcolor="#9999cc"> <br> |
24 | <font |
25 | style="font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" |
26 | color="#eeeeff"><b>AWStats logfile analyzer 7.0 Documentation</b></font><br> |
27 | <br> |
28 | </td> |
29 | <td align="center" bgcolor="#9999cc"> </td> |
30 | </tr> |
31 | </tbody> |
32 | </table> |
33 | <br> |
34 | <br> |
35 | <h1 |
36 | style="font-family: arial,helvetica,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 26px; line-height: normal; font-size-adjust: none; font-stretch: normal;">AWStats |
37 | Installation, Configuration and Reporting</h1> |
38 | There are 3 steps to begin using AWStats:<br> |
39 | <ul> |
40 | <li><a href="#INSTALL">I. Setup: Installation and configuration</a><br> |
41 | </li> |
42 | <li><a href="#BUILD_UPDATE">II. Process logs: Building/updating |
43 | statistics database</a><br> |
44 | </li> |
45 | <li><a href="#READ">III. Run Reports: Building and reading reports</a><br> |
46 | </li> |
47 | </ul> |
48 | <br> |
49 | |
50 | <!-- |
51 | <br> |
52 | Before starting, check that your Perl version is at least 5.007 (or higher) by running the <i>perl -v</i> command. |
53 | If not, you can install a recent Perl interpreter from <a href="http://www.activestate.com/ActivePerl/">ActivePerl</a> (<font color=#221188>Win32</font>) or <a href="http://www.perl.com/pub/language/info/software.html">Perl.com</a> (<font color=#221188>Unix/Linux/Other</font>).<br> |
54 | --> |
55 | <br> |
56 | <a name="INSTALL"> |
57 | <h2 style=""><u>I. Setup: Installation and configuration using |
58 | awstats_configure.pl</u></h2> |
59 | </a><br> |
60 | <a name="INSTALLAPACHE"><b>A) Setup for an Apache or compatible web |
61 | server (on Unix/Linux, Windows, MacOS...)</b></a><br> |
62 | <br> |
63 | <font style="color: rgb(17, 17, 85);"><b>* Step 1</b>:</font><br> |
64 | <br> |
65 | (if you use a package provided with a Linux distribution or Windows |
66 | installer, step 1 |
67 | might have already been done; if you don't know, you can run this step |
68 | again)<br> |
69 | <br> |
70 | After downloading and extracting the AWStats package, you should run |
71 | the awstats_configure.pl script to do |
72 | several setup actions. |
73 | You will find it in the AWStats <b>tools</b> directory (If using the |
74 | Windows installer, the script is |
75 | automatically launched):<br> |
76 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
77 | perl awstats_configure.pl |
78 | </td></tr></table> |
79 | <br> |
80 | <ul> |
81 | <u>This is what the script does/asks (you can do all these steps |
82 | manually instead of running awstats_configure.pl if you prefer):</u><br> |
83 | <br> |
84 | A) awstats_configure.pl tries to determine your current log format from |
85 | your Apache web server |
86 | configuration file httpd.conf (it asks for the path if not found). |
87 | If you use a <b>common</b> log, awstats_configure.pl will |
88 | suggest changing it to the <b>NCSA combined/XLF/ELF</b> format (you |
89 | can use your own custom log |
90 | format but this predefined log format is often the best choice and |
91 | makes setup easier).<br> |
92 | If you answer yes, awstats_configure.pl will modify your <b>httpd.conf</b>, |
93 | changing the |
94 | following directive:<br> |
95 | <i>from<br> |
96 | CustomLog /yourlogpath/yourlogfile common</i><br> |
97 | to<br> |
98 | <i>CustomLog /yourlogpath/yourlogfile combined</i><br> |
99 | <br> |
100 | See the Apache manual for more information on this directive (possibly |
101 | installed on your server as www.mysite.com/manual).<br> |
102 | <br> |
103 | B) awstats_configure.pl will then add, if not already present, the |
104 | following directives to your Apache configuration file |
105 | (note that the "/usr/local/awstats/wwwroot" path might differ according |
106 | to your distribution or OS:<br> |
107 | <i> <br> |
108 | # <br> |
109 | # Directives to add to your Apache conf file to allow use of AWStats as |
110 | a CGI. <br> |
111 | # Note that path "/usr/local/awstats/" must reflect your AWStats |
112 | Installation path. <br> |
113 | # <br> |
114 | Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/" <br> |
115 | Alias /awstatscss "/usr/local/awstats/wwwroot/css/" <br> |
116 | Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/" <br> |
117 | ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/" <br> |
118 | # <br> |
119 | # This is to permit URL access to scripts/files in AWStats directory. <br> |
120 | # <br> |
121 | <Directory "/usr/local/awstats/wwwroot"> <br> |
122 | Options None <br> |
123 | AllowOverride None <br> |
124 | Order allow,deny <br> |
125 | Allow from all <br> |
126 | </Directory> </i><br> |
127 | <br> |
128 | C) if changes were made as indicated in parts A and B, |
129 | awstats_configure.pl restarts Apache to apply the changes. To be |
130 | sure the log format change is effective, go to your homepage. This is |
131 | an example of the type of records you should see inserted in your new |
132 | log file after Apache |
133 | was restarted:<br> |
134 | <br> |
135 | 62.161.78.75 - - [dd/mmm/yyyy:hh:mm:ss +0000] "GET / HTTP/1.1" 200 1234 |
136 | "http://www.from.com/from.html" "Mozilla/4.0 (compatible; MSIE 5.01; |
137 | Windows NT 5.0)"<br> |
138 | <br> |
139 | D) awstats_configure.pl will ask you for a name for the configuration |
140 | profile file. Enter an appropriate name such as that of your |
141 | web server or the virtual domain to be analyzed, i.e. <b |
142 | style="font-style: italic;">mysite</b>.<br> |
143 | <br> |
144 | awstats_configure.pl will create a new file called <b>awstats.<span |
145 | style="font-style: italic;">mysite</span>.conf</b> |
146 | by copying the template file <b>awstats.model.conf</b>. |
147 | The new file location is:<br> |
148 | - For Linux/BSD/Unix users: /etc/awstats.<br> |
149 | - For Mac OS X, Windows and other operating systems: the same directory |
150 | as awstats.pl |
151 | (cgi-bin).<br> |
152 | <br> |
153 | |
154 | E) awstats_configure.pl ends.<br> |
155 | <br> |
156 | </ul> |
157 | <font style="color: rgb(17, 17, 85);"><b>* Step 2</b>:</font><br> |
158 | <br> |
159 | Once a configuration file has been created (by |
160 | awstats_configure.pl, by your package |
161 | installer or just by a manual copy of awstats.model.conf), it's |
162 | important to verify that the "MAIN PARAMETERS" |
163 | match your needs. Open awstats.<span |
164 | style="font-style: italic; font-weight: bold;">mysite</span>.conf in |
165 | your favorite text editor (i.e. notepad.exe, vi, gedit, etc) - |
166 | don´t use a word processor - and make changes as required.<br> |
167 | <br> |
168 | Particular attention should be given to these parameters:<br> |
169 | - Verify the <a href="awstats_config.html#LogFile">LogFile</a> |
170 | value. It should be the full path of your server log file (You |
171 | can also use a relative path from your awstats.pl directory, but a full |
172 | path avoids errors).<br> |
173 | - Verify the <a href="awstats_config.html#LogType">LogType</a> |
174 | value. It should be "W" for analyzing |
175 | web log files.<br> |
176 | - Check if <a href="awstats_config.html#LogFormat">LogFormat</a> is |
177 | set to "1" (for "NCSA apache combined/ELF/XLF log format") |
178 | or use a custom log format if you don't use the combined log format.<br> |
179 | - Set the <a href="awstats_config.html#SiteDomain">SiteDomain</a> |
180 | parameter to the main domain name or the intranet web server name |
181 | used to reach the web site to analyze (Example: www.mysite.com). If |
182 | you have several |
183 | possible names for same site, use the main domain name and add the |
184 | others to the list in the <a href="awstats_config.html#HostAlias">HostAlias</a> |
185 | parameter.<br> |
186 | - You can also change other parameters if you want. The full list is |
187 | described in <a href="awstats_config.html">Configurations/Directives |
188 | options</a> page.<br> |
189 | <br> |
190 | Installation and configuration is finished. You can jump to the <a |
191 | href="#BUILD_UPDATE">Process logs: Building/updating statistics |
192 | database</a> section.<br> |
193 | <br> |
194 | <br> |
195 | <br> |
196 | <a name="INSTALLIIS"><b>B) Setup for Microsoft's IIS server</b></a><br> |
197 | <br> |
198 | <font style="color: rgb(17, 17, 85);"><b>* Step 1</b>:</font><br> |
199 | <br> |
200 | Configure IIS to create logs in the <b>"Extended W3C log format"</b> (You can |
201 | still use |
202 | your own custom log format but setup is easier if you use the standard |
203 | extended format). To do so, start the IIS management console snap-in, |
204 | select the |
205 | appropriate web site and open its |
206 | <span style="font-weight: bold;">Properties</span>. Choose "<span |
207 | style="font-weight: bold;">W3C Extended Log Format</span>", then <span |
208 | style="font-weight: bold;">Properties</span>, then the |
209 | Tab "<span style="font-weight: bold;">Extended Properties</span>" and |
210 | uncheck everything under Extended |
211 | Properties. |
212 | Once they are all cleared, check just the following fields:<br> |
213 | <table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ> |
214 | date<br> |
215 | time<br> |
216 | c-ip<br> |
217 | cs-username<br> |
218 | cs-method<br> |
219 | cs-uri-stem<br> |
220 | cs-uri-query<br> |
221 | sc-status<br> |
222 | sc-bytes<br> |
223 | cs-version<br> |
224 | cs(User-Agent)<br> |
225 | cs(Referer)<br> |
226 | </td></tr></table> |
227 | <br> |
228 | To be sure the log format change is effective, you must stop IIS, |
229 | backup it up (if you desire) and remove all of the old log files, restart IIS and go to |
230 | your homepage. This is an example of the type of records you should |
231 | find in the |
232 | new log file:<br> |
233 | <table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ> |
234 | 2000-07-19 14:14:14 62.161.78.73 - GET / 200 1234 HTTP/1.1 |
235 | Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0) |
236 | http://www.from.com/from.htm |
237 | </td></tr></table> |
238 | <br> |
239 | |
240 | <font style="color: rgb(17, 17, 85);"><b>* Step 2</b>:</font><br> |
241 | <br> |
242 | Copy the contents of the AWStats provided cgi-bin folder, from where |
243 | the AWStats package put it on your local hard |
244 | drive, |
245 | to your server's cgi-bin |
246 | directory (this includes <b>awstats.pl</b>, <b>awstats.model.conf</b>, |
247 | and the <b>lang</b>, <b>lib</b> and <b>plugins</b> sub-directories).<br> |
248 | <br> |
249 | <font style="color: rgb(17, 17, 85);"><b>* Step 3</b>:</font><br> |
250 | <br> |
251 | Move AWStats <b>icon sub-directories</b> and its content into a |
252 | directory readable by your |
253 | web server, for example C:\yourwwwroot\icon.<br> |
254 | <br> |
255 | <font style="color: rgb(17, 17, 85);"><b>* Step 4</b>:</font><br> |
256 | <br> |
257 | Create a configuration file by copying <b>awstats.model.conf</b> to a |
258 | new file named <b>awstats.<span style="font-style: italic;">mysite</span>.conf</b> |
259 | where "<span style="font-style: italic;">mysite</span>" is a |
260 | value of your choice but usually is the domain or virtual host name. |
261 | This new file must be saved in the same directory as awstats.pl (i.e. |
262 | cgi-bin).<br> |
263 | <br> |
264 | <font style="color: rgb(17, 17, 85);"><b>* Step 5</b>:</font><br> |
265 | <br> |
266 | Edit your new <b>awstats.<span style="font-style: italic;">mysite</span>.conf</b> |
267 | file to match your specific environment:<br> |
268 | - Change the <a href="awstats_config.html#LogFile">LogFile</a> value |
269 | to the |
270 | full path of your web server log file (You |
271 | can also use a relative path from your awstats.pl (cgi-bin) directory).<br> |
272 | - Change the <a href="awstats_config.html#LogType">LogType</a> value |
273 | to |
274 | "W" for analyzing |
275 | web log files.<br> |
276 | - Change the <a href="awstats_config.html#LogFormat">LogFormat</a> to |
277 | 2 if you are using the <b>"Extended W3C log format"</b> described in |
278 | step 1; in the case of a custom format, list the IIS fields |
279 | being logged, for example:<br> |
280 | <i>LogFormat="date time c-ip cs-username cs-method cs-uri-stem |
281 | cs-uri-query sc-status sc-bytes cs-version cs(User-Agent) cs(Referer)"</i><br> |
282 | - Change the <a href="awstats_config.html#DirIcons">DirIcons</a> |
283 | parameter |
284 | to reflect relative path of icon directory.<br> |
285 | - Set the <a href="awstats_config.html#SiteDomain">SiteDomain</a> |
286 | parameter to the main domain name or the intranet |
287 | web server name used to reach the web site being analyzed (Example: |
288 | www.mydomain.com).<br> |
289 | - Set the <a href="awstats_config.html#AllowToUpdateStatsFromBrowser">AllowToUpdateStatsFromBrowser</a> |
290 | parameter to 1 if you don't have command line access and have only cgi |
291 | access.<br> |
292 | - Review and change other parameters if appropriate.<br> |
293 | <br> |
294 | Installation and configuration is finished. You can jump to the <a |
295 | href="#BUILD_UPDATE">Process logs: Building/Updating statistics |
296 | database</a> section.<br> |
297 | <br> |
298 | <b>C) Setup for other web servers</b><br> |
299 | <br> |
300 | The setup process is similar to the setup for Apache or IIS.<br> |
301 | Use <a href="awstats_config.html#LogFormat">LogFormat</a> to value "3" |
302 | if you have WebStar native log format. |
303 | Use a personalized <a href="awstats_config.html#LogFormat">LogFormat</a> |
304 | if your log format is other.<br> |
305 | <br> |
306 | <b>D) Setup for other Internet servers, i.e. FTP, Mail, Streaming media</b><br> |
307 | <br> |
308 | The setup process for other file formats is described in the relevant |
309 | FAQ topics: |
310 | <a href="awstats_faq.html#FTP">FAQ-COM090: FTP</a> |
311 | <a href="awstats_faq.html#MAIL">FAQ-COM100: Mail</a> and <a |
312 | href="awstats_faq.html#MEDIASERVER">FAQ-COM110: Streaming media</a>.<br> |
313 | <br> |
314 | |
315 | <br> |
316 | <a name="BUILD_UPDATE"> |
317 | <h2 style=""><u>II. Process logs: Building/updating statistics database</u></h2> |
318 | </a><br> |
319 | <font style="color: rgb(17, 17, 85);"><b>* Update from command line (recommended)</b>:</font><br> |
320 | <br> |
321 | The first log analysis should be done |
322 | manually from the command line since the |
323 | process may be long and it's easier to solve problems when you can see |
324 | the |
325 | command output (if you don't |
326 | have Command Line access, skip to Step 2). The |
327 | AWStats create (and update) statistics database command is:<br> |
328 | <br> |
329 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
330 | perl awstats.pl -config=mysite -update |
331 | </td></tr></table> |
332 | <br> |
333 | where <span style="font-style: italic;">mysite</span> must |
334 | be substituted with the domain/virtual host name you selected earlier |
335 | during AWStats configuration.<br> |
336 | <br> |
337 | AWStats will read the configuration file awstats.mysite.conf |
338 | (or if |
339 | not found, awstats.conf) |
340 | and create/update its database with all summary information issued from |
341 | analyzed log file.<br> |
342 | <br> |
343 | AWStats statistics database files are saved in directory defined by the |
344 | <a href="awstats_config.html#DirData">DirData</a> parameter in |
345 | configuration file.<br> |
346 | When the create/update is finished, you should see a similar result on |
347 | your screen:<br> |
348 | <br> |
349 | <table width="95%" border=1 cellpadding=0 cellspacing=0 bgcolor=#F4F4F4 class=CFAQ><tr class=CFAQ><td class=CFAQ> |
350 | Update for config "/etc/awstats/awstats.mysite.conf"<br> |
351 | With data in log file "/pathtoyourlog/yourlog.log"...<br> |
352 | Phase 1 : First bypass old records, searching new record...<br> |
353 | Searching new records from beginning of log file...<br> |
354 | Phase 2 : Now process new records (Flush history on disk after 20000 |
355 | hosts)...<br> |
356 | Jumped lines in file: 0<br> |
357 | Parsed lines in file: 225730<br> |
358 | Found 122 dropped records,<br> |
359 | Found 87 corrupted records,<br> |
360 | Found 0 old records,<br> |
361 | Found 225521 new qualified records.<br> |
362 | </td></tr></table> |
363 | <br> |
364 | <b>Dropped records</b> are records discarded because they were not |
365 | "user HTTP requests" or were requests matching AWStats filters (See the |
366 | <a href="awstats_config.html#SkipHosts">SkipHosts</a>, |
367 | <a href="awstats_config.html#SkipUserAgents">SkipUserAgents</a>, |
368 | <a href="awstats_config.html#SkipFiles">SkipFiles</a>, <a |
369 | href="awstats_config.html#OnlyHosts">OnlyHosts</a>, |
370 | <a href="awstats_config.html#OnlyUserAgents">OnlyUserAgents</a> and <a |
371 | href="awstats_config.html#OnlyFiles">OnlyFiles</a> parameters). |
372 | If you want to see which lines were dropped, you can add the <b>-showdropped</b> |
373 | option on the command line.<br> |
374 | <br> |
375 | <b>Corrupted records</b> are records that do not match the log format |
376 | defined by the "LogFormat" parameter in the AWStats configuration file. |
377 | All web servers will typically have a few corrupted records |
378 | (<5%) even when everything works correctly. |
379 | This can result for several reasons: 1) Web server internal bugs, |
380 | 2) bad requests made by buggy browsers, 3) a dirty web server shutdown, |
381 | such as unplugging the server... <br> |
382 | <br> |
383 | If all of your lines are corrupted and the <a |
384 | href="awstats_config.html#LogFormat">LogFormat</a> parameter in |
385 | AWStats configuration file is |
386 | correct, then there may be a setup problem with your web server log format. |
387 | Don't forget that |
388 | your <a href="awstats_config.html#OnlyFiles">LogFormat</a> parameter |
389 | in the AWStats configuration file MUST match |
390 | the log file format you analyze. If you want to see which lines |
391 | are corrupted, you can add the <b>-showcorrupted</b> |
392 | option on the command line.<br> |
393 | <br> |
394 | <b>Old records</b> are simply records that were already processed by a |
395 | previous update session. |
396 | Although it is not necessary to purge your log file after |
397 | each update process, it is highly recommended that you do so as often |
398 | as possible.<br> |
399 | <br> |
400 | <b>New records</b> are records in your log file that were successfully |
401 | used to build/update the statistics database.<br> |
402 | <br> |
403 | Note: A log analysis process might be slow (one second for each 4500 |
404 | lines of your |
405 | logfile with an Athlon 1Ghz, plus DNS resolution time for each |
406 | different |
407 | IP |
408 | address in your logfile if <a href="awstats_config.html#DNSLookup">DNSLookup</a> |
409 | is set to 1 and not already done in your log file). See the <a |
410 | href="awstats_benchmark.html">Benchmarks page</a> for more detailed |
411 | information.<br> |
412 | <br> |
413 | <!-- <span style="font-weight: bold;">Flush history </span>messages referer |
414 | to ... (Flush history on disk after 20000 hosts). Flush history |
415 | file on disk (unique url reach flush limit of 5000 --> |
416 | |
417 | <br> |
418 | <font style="color: rgb(17, 17, 85);"><b>* Update from a browser</b>:</font><br> |
419 | <br> |
420 | AWStats statistics can also be updated from a browser, providing |
421 | real-time statistics, by clicking |
422 | the "Update now" link that appears when AWStats is used as a CGI (The |
423 | URL is described in the next |
424 | section '<a href="#READ">Run reports: Building and reading reports</a>').<br> |
425 | <br> |
426 | <b>Warning</b>!!<br> |
427 | To enable this link, the configuration file parameter <a |
428 | href="awstats_config.html#AllowToUpdateStatsFromBrowser">AllowToUpdateStatsFromBrowser</a> |
429 | must be set to 1 (The link is not enabled by |
430 | default).<br> |
431 | Using the on-line update does not prevent you from running the update |
432 | process automatically on a scheduled basis (the command is same as that |
433 | of the first update process above).<br> |
434 | For this, you have two choices:<br> |
435 | - Include the update command in your <b>logrotate</b> process. See <a |
436 | href="awstats_faq.html#ROTATE">FAQ-COM120</a> for details.<br> |
437 | - Or add instructions in your <b>crontab</b> (Unix/Linux) or your <b>task |
438 | scheduler</b> (Windows), to regularly launch the Awstats update |
439 | process. See <a href="awstats_faq.html#CRONTAB">FAQ-COM130</a> for |
440 | details.<br> |
441 | <br> |
442 | See the AWStats <a href="awstats_benchmark.html">Benchmarks page</a> |
443 | for |
444 | the recommended update/logrotate frequency.<br> |
445 | <br> |
446 | |
447 | <br> |
448 | <a name="READ"> |
449 | <h2 style=""><u>III. Run reports: Building and reading reports</u></h2> |
450 | </a><br> |
451 | To see the analysis results, you have several options depending on your |
452 | <a href="awstats_security.html">security policy</a>.<br> |
453 | <br> |
454 | Note: you must have created a statistics data base for the analysis |
455 | period by processing your |
456 | log files before you try to create reports. See the previous |
457 | section.<br> |
458 | <br> |
459 | 1. The first option is to build the main reports, in a static HTML |
460 | page, |
461 | from the command line, |
462 | using the following syntax (skip to the second option if you only have |
463 | CGI access):<br> |
464 | <br> |
465 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
466 | perl awstats.pl -config=mysite -output -staticlinks |
467 | > awstats.mysite.html |
468 | </td></tr></table> |
469 | <br> |
470 | where <span style="font-style: italic;">mysite</span> must |
471 | be substituted with the domain/virtual host name you selected earlier |
472 | during AWStats configuration.<br> |
473 | <br> |
474 | To create specific individual reports, specify the report name on the |
475 | command |
476 | line as follows¹:<br> |
477 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
478 | perl awstats.pl -config=mysite -output=alldomains |
479 | -staticlinks > awstats.mysite.alldomains.html<br> |
480 | perl awstats.pl -config=mysite -output=allhosts |
481 | -staticlinks > awstats.mysite.allhosts.html<br> |
482 | perl awstats.pl -config=mysite -output=lasthosts |
483 | -staticlinks > awstats.mysite.lasthosts.html<br> |
484 | perl awstats.pl -config=mysite -output=unknownip |
485 | -staticlinks > awstats.mysite.unknownip.html<br> |
486 | perl awstats.pl -config=mysite -output=alllogins |
487 | -staticlinks > awstats.mysite.alllogins.html<br> |
488 | perl awstats.pl -config=mysite -output=lastlogins |
489 | -staticlinks > awstats.mysite.lastlogins.html<br> |
490 | perl awstats.pl -config=mysite -output=allrobots |
491 | -staticlinks > awstats.mysite.allrobots.html<br> |
492 | perl awstats.pl -config=mysite -output=lastrobots |
493 | -staticlinks > awstats.mysite.lastrobots.html<br> |
494 | perl awstats.pl -config=mysite -output=urldetail |
495 | -staticlinks > awstats.mysite.urldetail.html<br> |
496 | perl awstats.pl -config=mysite -output=urlentry |
497 | -staticlinks > awstats.mysite.urlentry.html<br> |
498 | perl awstats.pl -config=mysite -output=urlexit |
499 | -staticlinks > awstats.mysite.urlexit.html<br> |
500 | perl awstats.pl -config=mysite -output=browserdetail |
501 | -staticlinks > awstats.mysite.browserdetail.html<br> |
502 | perl awstats.pl -config=mysite -output=osdetail |
503 | -staticlinks > awstats.mysite.osdetail.html<br> |
504 | perl awstats.pl -config=mysite -output=unknownbrowser |
505 | -staticlinks > awstats.mysite.unknownbrowser.html<br> |
506 | perl awstats.pl -config=mysite -output=unknownos |
507 | -staticlinks > awstats.mysite.unknownos.html<br> |
508 | perl awstats.pl -config=mysite -output=refererse |
509 | -staticlinks > awstats.mysite.refererse.html<br> |
510 | perl awstats.pl -config=mysite -output=refererpages |
511 | -staticlinks > awstats.mysite.refererpages.html<br> |
512 | perl awstats.pl -config=mysite -output=keyphrases |
513 | -staticlinks > awstats.mysite.keyphrases.html<br> |
514 | perl awstats.pl -config=mysite -output=keywords |
515 | -staticlinks > awstats.mysite.keywords.html<br> |
516 | perl awstats.pl -config=mysite -output=errors404 |
517 | -staticlinks > awstats.mysite.errors404.html<br> |
518 | </td></tr></table> |
519 | <br> |
520 | ¹If you prefer, you can use the <a |
521 | href="awstats_tools.html#awstats_buildstaticpages">awstats_buildstaticpages</a> |
522 | tool to |
523 | build all these pages in one command, or to generate PDF files.<br> |
524 | <br> |
525 | Notes:<br> |
526 | <br> |
527 | a) You can also add a <i>filter</i> on the following reports: <b>urldetail, |
528 | urlentry, urlexit, allhosts, refererpages</b>. The <i>filter</i> |
529 | can be a regexp (regular expression) on the full key you want AWStats |
530 | to report on and is appended to the output |
531 | parameter separated by a ":".<br> |
532 | <br> |
533 | For example, to output the urldetail report, including only pages which |
534 | contain /news in their URL, you |
535 | can use the following command line:<br> |
536 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
537 | perl awstats.pl -config=mysite -output=urldetail:</b>/news<b> |
538 | -staticlinks > awstats.mysite.urldetailwithfilter.html</b> |
539 | </td></tr></table> |
540 | <br> |
541 | b) If you want to build a report for a particular month, add |
542 | the options <i><b>-month=MM -year=YYYY</b></i> where MM is the month |
543 | expressed as two digits, i.e. 03, and year is the four digit |
544 | year. To build a |
545 | report for a full year, add the options <i><b>-month=all -year=YYYY</b></i> |
546 | (warning: this is often resource intensive and might use a lot of |
547 | memory |
548 | and CPU. Unix/Linux like operating systems might benefit from use |
549 | of the "nice" command.)<br> |
550 | <br> |
551 | <br> |
552 | 2) The second option is to dynamically view your statistics from a |
553 | browser. To do this, use the URL:<br> |
554 | <table border=1 cellpadding=1 cellspacing=0 bgcolor=#F4F4F4 width="95%" class=CFAQ><tr class=CFAQ><td class=CFAQ> |
555 | http://www.myserver.mydomain/awstats/awstats.pl?config=mysite |
556 | </td></tr></table> |
557 | <br> |
558 | where <i>mysite</i> specifies the configuration |
559 | file to |
560 | use (AWStats will use the file awstats.<i>mysite</i>.conf).<br> |
561 | <br> |
562 | All output command line options (except -staticlinks and -logfile) are |
563 | also available when using AWStats with a browser. Just use them as URL |
564 | parameters: change "-option" to |
565 | "&option", i.e. <b><i>http://www.myserver.mydomain/awstats/awstats.pl?month=MM&year=YYYY&output=unknownos</i></b><br> |
566 | <br> |
567 | Reports are generated in real time from the statistics data |
568 | base. If this is slow, or putting too much load on your server, |
569 | consider generating static reports instead.<br> |
570 | <br> |
571 | If the <a href="awstats_config.html#AllowToUpdateStatsFromBrowser">AllowToUpdateStatsFromBrowser</a> |
572 | parameter is set to 1 in AWStats configuration file, |
573 | you will also be able to run the update process from your browser. Just |
574 | click on the link "Update now".<br> |
575 | <br> |
576 | <br> |
577 | <hr> |
578 | <script language="javascript"> |
579 | var date='$Date: 2010/06/22 21:35:24 $'; |
580 | document.writeln("Last revision: "+date); |
581 | </script> |
582 | |
583 | </body> |
584 | </html> |