R4L/Services/Hosting/Basic/LogFormat

From R4L Help Wiki
< R4L‎ | Services‎ | Hosting‎ | Basic
Revision as of 14:51, 4 February 2014 by Admin (Talk | contribs)

Jump to: navigation, search

Hosting: How can I download & Understand Hosting Logs

The R4L web hosting service supports recording web logs for your traffic. This can help you understand the level of traffic you're getting as well as from where your web traffic is coming from.

To use this service, you first need to Enable Logging of Traffic. This help page also shows you how to use the log file summary too l on your account.

Downloading Logs

You may also download the log file from your site. The raw log file is called access.log, and is in the log directory. Two log files are stored, the current day's log called access.log, and the complete previous day's log file called access.log.old. If you are downloading your log file on a daily basis, you should download access.log.old, since this contains the complete previous day's logs. The file access.log is being continually updated during the day.

Automating downloading

If you are on a Linux or Mac, you can set up a cron job to automatically download the previous day's log file to your local system. You will need to configure this to FTP the access.log.old file on a daily basis.

For Windows users, you can use either of the following:

Use cURL to download your daily access log, using the command line: curl.exe --ftp-ssl --insecure -u username:password ftp://ftp.domain-name.com:21/log/access.log.old download and install a free automated FTP program called AutoFTP Free 2.5. You can configure this program to do a daily download of your access.log.old file.

Log File Format

You may use a tool to analyze the log file. The raw format is as follows:

IP Address: The IP address of the visitor to your site
Date: Date and time of the access. This is in Eastern Daylight or Eastern Standard time.
Get: The word "GET", which is the type of server access.
Server Code: The Apache server code. Usually, this will be 200. If you see 404, this means the page or resource was not found, and an indication you have a broken link.
Bytes: The size of the file/image in bytes.
URL: The full URL address of what was accessed.
Refer: The location/URL your visitor was on prior to access. Did the visit come from another site, a search engine...


With analog, use the following logformat config:

  LOGFORMAT (%s [%Y/%m/%d@%h:%n:%j] "%j %r %j" %c %b "%v" "%f")