2.3.21. Site access logs (Access log)

Site access logs (Access—logs) are the logs of absolutely all requests to the site that reached our web server. It is in the section "HostingMy sites → Site access logs":

When using traffic filtering services like Cloudflare it is not always possible to quickly track whether filtering is enabled or disabled, so not the real IP of visitors, but the addresses of the services used, may appear in the log. To forcibly update information about the filtering service in our system at the top of the page with a log opposite "Automatically detected traffic filtering service" click on the button with the name of the filtering service used:

After pressing the button, new requests will be recorded already with real IPs. This does not change the old records.

All requests to the site are recorded in nginx access log... On businesshosting there is an additional log - FPM access log... It contains requests coming to the site when in site settings selected as the web server PHP-FPM... Logs are displayed as tabs above the block date picker... On regular hosting, only the general nginx access log is available.

Important points:

  • Logs are stored only for the current and 4 previous months, and only for those days when there were requests to the sites. Older logs are not kept.
  • The current date in the list is always available, regardless of whether there are entries in the log or not.
  • If yesterday's date is not in the list of dates, then the logs for that day are still being processed and will become available later (as a rule, closer to the afternoon). A similar situation can be on the 1st of the month with logs and reports for the previous month.

Above log for the day a list of all dates for which logs are available is displayed:

In the list you can:

Important points:

  • If the size of the log does not exceed 100 MB, it can be viewed directly in the browser and download yourself. Larger logs can only be downloaded.
  • When enabled protection from bots the log will contain the associated GET and POST requests.
  • After execution technical check of the site or clearing the PageSpeed cache our IP can be found in the logs. This is due to the fact that in order to perform these actions, our server needs to make a request to the site.
  • As a result of the work of the system for creating screenshots for the section "My sites" logs may contain requests with User-Agent adm.tools screenshot tools.

The log for the day displays information on all requests for selected date:

  • Selecting a query method and a search box with a button "Search" — allows you to filter requests by method, date, IP or the presence of a piece of text.
  • "Case sensitive" — turns on the search mode with strict match of upper / lower letters.
  • "Download" — download log per day.
  • "GoAccess Report" — view GoAccess report per day. Note Only for nginx access log.
  • Timeline with buttons "Filter" and "Reset filter" — allows you to set the time range for which the log will be displayed or downloaded per day.
  • Each line of the log has a strictly fixed format:
    • "Time" - request time.
    • "IP" — IP address from which the request was made. By clicking on the address, requests are automatically filtered by this IP. Addresses to which restricted access, are displayed in red.
    • "Request" - the request itself. In the request:
      1. GET — request method.
      2. / — URI.
      3. HTTP/1.0" — version of the used HTTP protocol.
      4. 200 — server response code for this request.
      5. 12345 — length of the server response to the request in bytes.
      6. "https://www.google.com.ua/" — Request source URL.
      7. "Mozilla/5.0 (XXXXXX) XXXXXX — User—Agent of the visitor.
    • 🚫 — adds IP to the list access restrictions and turns on the mode "Allow access to site for everyone, deny access only for IPs below".
  • Per day:
    1. In the block date picker select the date you want.
    2. V log for the day click "Download".
  • Per month — in the block date picker next to the desired month, click "Download for month". Note Only for nginx access log. Attention! The log for the current month includes only the days that have passed (that is, all days since the beginning of the month, except the current).

Based on Access logs, you can generate convenient HTML reports. They are generated by the program. GoAccess, built-in hosting. Each report contains visual statistics on the following metrics: unique visitors, requested URLs and static files, 404 errors, hostnames and IPs of visitors, their operating systems and browsers, distribution of requests over time, referring sites, HTTP response codes and countries from which requests were received .

Important points:

  • Reports are available only for nginx access log.
  • Reports are generated in a language that installed in the account.
  • After the first opening, reports are cached on a separate server and stored for the same time as Access logs.
  • The report for the current day is always regenerated and always contains up-to-date information.
  • The report for the current month includes only the days that have passed (that is, all days from the beginning of the month, except the current).
  • Per day:
    1. In the block date picker select the date you want.
    2. V log for the day click "GoAccess Report".
  • Per month — in the block date picker next to the desired month, click "GoAccess Report".
  • For arbitrary periods — you can create it yourself. For example, this can be useful when you need to create one large report that includes a period of more than one month. To create a report you need download logs for the required periods and on their basis generate a report on your PC.

Access log can download and study with console commands or specialized software capable of analyzing such logs and displaying various static and analytical information, for example Apache Log Viewer.