damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20151005-ReconfiguringLocalAwstatsForAzureWebApp.html #24

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20151005-ReconfiguringLocalAwstatsForAzureWebApp.html

damirarh commented 1 year ago

Imported comment written by Matthew Krieger on 2017-03-10T20:42:09

How did you configure AWStats to accept Azure IIS' w3c extended format? IIS allows you to turn off extended but not Azure App service.

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2017-03-11T14:05:22

It's been a while since I configured it, but based on the AWStats configuration file timestamp, I didn't have to change it at all. For the record, the IIS log file downloaded from Azure contains the following fields: date, time, s-sitename, cs-method, cs-uri-stem, cs-uri-query, s-port, cs-username, c-ip, cs(User-Agent), cs(Cookie), cs(Referer), cs-host, sc-status, sc-substatus, sc-win32-status, sc-bytes, cs-bytes, time-taken. AWStats parser seems to handle the extra fields in the files just fine.

damirarh commented 1 year ago

Imported comment written by Matthew Krieger on 2017-03-11T14:36:26

Ah ok maybe it's ignoring the extra fields. Could you please share the LogFormat parameter from your awstats conf file?

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2017-03-11T14:41:31

Sure, it's: LogFormat=2.

damirarh commented 1 year ago

Imported comment written by Matthew Krieger on 2017-03-11T15:01:51

Lol that was easy. :) I've got that also and awstats is complaining about the record format and ignoring the records. I'm going to do more testing.

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2019-02-03T12:59:59

I had to reconfigure AWStats from scratch when moving it to a Docker container. During this process I encountered the same problem: When using LogFormat=2, it complained about corrupted records. To resolve the issue, I had to specify a custom format: LogFormat="%time2 %other %method %url %query %other %logname %host %ua %other %referer %other %code %other %other %bytesd %other %other".