]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Add methodurlnoprot in possible rules to define log format.
authoreldy <>
Sat, 1 Sep 2001 18:49:18 +0000 (18:49 +0000)
committereldy <>
Sat, 1 Sep 2001 18:49:18 +0000 (18:49 +0000)
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl

index dbc8606e5ca691688ad48897d02eb024df0264d9..8072fc36867e5bc31ba490b3b8d7ff19adabcc1e 100644 (file)
@@ -36,20 +36,21 @@ LogFile="/var/log/httpd/mylog.log"
 # README.txt to setup your server to create log files with required format).
 # If your log is a personalised format, you must use the following syntax
 # keys to define your log format :
-# %host                Host client name or IP adress
-# %time1               Date and time with format [dd/mmm/yyyy:hh:mm:ss +0000]
-# %time2               Date and time with format yyyy-mm-dd hh-mm-ss
-# %methodurl   Method and URL with format "GET /index.html HTTP/x.x"
-# %method              Method with format GET
-# %url                 URL only with format /index.html
-# %code                        HTTP return code with format xxx
-# %bytesd              Size of document in bytes
-# %refererquot Referer page with format "http://from.com/from.htm"
-# %referer             Referer page with format http://from.com/from.htm
-# %uaquot              User agent with format "Mozilla/4.0 (compatible, ...)"
-# %ua                  User agent with format Mozilla/4.0_(compatible...)
+# %host               Host client name or IP adress
+# %time1              Date and time with format [dd/mmm/yyyy:hh:mm:ss +0000]
+# %time2              Date and time with format yyyy-mm-dd hh-mm-ss
+# %methodurl          Method and URL with format "GET /index.html HTTP/x.x"
+# %methodurlnoprot    Method and URL with format "GET /index.html"
+# %method             Method with format GET
+# %url                URL only with format /index.html
+# %code               HTTP return code with format xxx
+# %bytesd             Size of document in bytes
+# %refererquot        Referer page with format "http://from.com/from.htm"
+# %referer            Referer page with format http://from.com/from.htm
+# %uaquot             User agent with format "Mozilla/4.0 (compatible, ...)"
+# %ua                 User agent with format Mozilla/4.0_(compatible...)
 # If your log format has some fields not included in this list, use
-# %other               Means another field
+# %other              Means another field
 #
 # Examples for Apache combined logs (this two examples are equivalent):
 # LogFormat = 1
index 1b58728f73c69075d57aba61d46f3b721603d61e..a8b87f1b19d8b96545c21ff54047ff62df0e779a 100644 (file)
@@ -71,7 +71,7 @@ $found, $internal_link, $new) = ();
 %MonthBytes = %MonthHits = %MonthHostsKnown = %MonthHostsUnknown = %MonthPages = %MonthUnique = %MonthVisits =
 %monthlib = %monthnum = ();
 
-$VERSION="3.1 (build 39)";
+$VERSION="3.1 (build 40)";
 $Lang="en";
 
 # Default value
@@ -2010,6 +2010,14 @@ if ($UpdateStats) {
                                $i++;
                                $PerlParsingFormat .= "\\\"([^\\s]*) ([^\\s]*) [^\\\"]*\\\" ";
                        }
+                       if ($f =~ /%methodurlnoprot$/) {
+                               $found=1; 
+                               $pos_method = $i;
+                               $i++;
+                               $pos_url = $i;
+                               $i++;
+                               $PerlParsingFormat .= "\\\"([^\\s]*) ([^\\s]*)\\\" ";
+                       }
                        if ($f =~ /%method$/ || $f =~ /cs-method$/) {
                                $found=1; 
                                $pos_method = $i;
@@ -2064,10 +2072,6 @@ if ($UpdateStats) {
        if ($pos_url eq "") { error("Error: Your personalised LogFormat does not include all fields required by AWStats (Add \%methodurl or \%url in your LogFormat string)."); }
        if ($pos_code eq "") { error("Error: Your personalised LogFormat does not include all fields required by AWStats (Add \%code in your LogFormat string)."); }
        if ($pos_size eq "") { error("Error: Your personalised LogFormat does not include all fields required by AWStats (Add \%bytesd in your LogFormat string)."); }
-       if ($LogFormat != 4) {  # If not common format, referer and agent are required
-               if ($pos_referer eq "") { error("Error: Your personalised LogFormat does not include all fields required by AWStats (Add \%referer or \%refererquot in your LogFormat string)."); }
-               if ($pos_agent eq "") { error("Error: Your personalised LogFormat does not include all fields required by AWStats (Add \%ua or \%uaquot in your LogFormat string)."); }
-       }
        &debug("PerlParsingFormat is $PerlParsingFormat");