Download or delete website logs

更新时间:
复制 MD 格式

Reviewing website logs helps you understand visitor behavior, track traffic trends, and analyze operational issues. This information helps you improve the user experience and guide website optimization. This topic describes how to download or delete website logs.

Website logs

The available website logs depend on the operating system of your Web Hosting instance.

  • For Web Hosting instances that run a Linux operating system, website logs include access logs, error logs, FTP logs, and archived logs.

  • For Web Hosting instances that run a Windows operating system, website logs typically refer to access logs.

Access log

An access log records summary information about website visitors, including their IP address, access time, and the pages they visited.

Unlike archived logs, access logs show information from the last 7 or 180 days. The access path and limitations for viewing them vary by Web Hosting type. For example:

Host type

Access path

Limitations

Enhanced Edition Web Hosting (Linux OS)

On the Access Log tab of the Website Log page.

You can view and download access logs from the last 7 days.

Enhanced Edition Web Hosting (Windows OS)

On the Website Log page.

You can view and download access logs from the last 180 days.

Error log

An error log records various errors encountered during website operation and related diagnostic information to help you promptly troubleshoot and fix issues.

FTP log

An FTP log records activity on an FTP server. For example, after a Web Hosting instance connects to an FTP server, the FTP log records the connection time, remote IP address, action description, and authentication information.

The name of an FTP log and the operations you can perform on it depend on its age:

  • Today's FTP log: The file is named vsftpd.log. You can download the current day's FTP log.

  • Historical FTP logs: These logs are compressed into .gz files. You can download or delete these historical FTP logs.

Important
  • Currently, only Enhanced Edition Web Hosting instances (both shared and dedicated) that run a Linux operating system support downloading or deleting FTP logs.

  • Web Hosting instances can store FTP logs for a maximum of 30 days. If a website has no FTP activity on a given day, no FTP log is generated for that day.

Archived log

An archived log stores long-term website access logs, which include visitor IP addresses, access times, and visited pages.

If you need to view long-term access logs, you can view them on the Archived Log tab or submit a ticket for assistance. The paths and limitations for viewing and downloading archived logs vary based on the type of Web Hosting product. For example:

Host type

Access path

Limitations

Enhanced Edition Web Hosting (Linux OS)

On the Website log page, on the Access log tab.

You can view and download access logs from the last 180 days.

Other types of standard Web Hosting instances

Whether the archived log feature is supported depends on the options displayed in the Web Hosting console.

  • If the Website Log page has an Archived Log tab, on the Archived Log tab.

  • If the Website Log page does not have the Archived Log tab, please submit a ticket to obtain it.

Procedure

Note

Before you begin, make sure you have an FTP client installed. We recommend using FileZilla. For more information, see Manage website files with FileZilla.

Linux OS instances

This procedure uses an Advanced Enhanced Edition dedicated web hosting instance that runs a Linux operating system as an example. For other host types, support for downloading archived logs may vary. The options shown in the console are definitive.

  1. Log on to the Cloud Web Hosting management page.
  2. Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
  3. In the navigation pane on the left, choose File Management > Website Logs.
  4. Download or delete a website log.

    For Enhanced Edition Web Hosting instances that run a Linux operating system, you can directly download and delete access logs, error logs, and FTP logs from the console. However, archived logs must be downloaded or deleted using an FTP client. Note the following:

    • Downloaded website logs are automatically stored in the wwwlogs directory of your Web Hosting instance. You can use an FTP client to download the log files to your local computer to view them. For more information, see Manage files by using FileZilla.

    • Deleting website logs compromises their integrity and may prevent you from quickly troubleshooting website issues. Proceed with caution.

    Access log

    1. On the Website Log page, click the Access Log tab.

    2. Find the target access log and click Download or Delete in the Actions column.

    3. In the dialog box that appears, follow the prompts to download or delete the access log.

      • Download access log: For example, in Google Chrome, in the File Download dialog box that appears, you need to copy the link and open it in a new window to download the access log file. For other browsers, you can click the link directly.

        After the download is complete, click Confirm.

      • Delete the access log: Access logs consume your web space. If you need to delete an access log, click Confirm in the confirmation dialog box.

    Error log

    1. On the Website Log page, click the Error Log tab.

    2. Find the target error log and click Download or Delete in the Actions column.

    3. In the dialog box that appears, follow the prompts to download or delete the error log.

      • Download error log: For example, in Google Chrome, you need to copy the link from the pop-up File Download dialog box and open it in a new window to download the corresponding error log file. For other browsers, you can click the link directly.

        After the download is complete, click Confirm.

      • Delete the error log: Error logs consume your web space. If you need to delete an error log, click Confirm in the confirmation dialog box.

    FTP log

    1. On the Website Log page, click the FTP Log tab.

    2. Find the target FTP log and click Download or Delete in the Actions column.

    3. In the dialog box that appears, follow the prompts to download or delete the FTP log.

      • Download FTP log: This example uses Google Chrome. In the pop-up File Download dialog box, you must copy the link and open it in a new window to download the FTP log file. In other browsers, you can click the link directly.

        After the download is complete, click Confirm.

      • Delete the FTP log: FTP logs consume your web space. If you need to delete an FTP log, click Confirm in the confirmation dialog box.

    Archived log

    1. On the Website Log page, click the Archived Log tab to check whether log archiving is enabled.

      • If it is enabled: In the archived log list, note the name of the log you want to download and proceed to the next step.

      • If it is not enabled: Perform a system update. Follow these steps:

        1. In the dialog box that prompts you to enable archived logging, click Confirm.

          The dialog box indicates that the server will be temporarily unavailable for about 30 to 300 seconds during the system update.

        2. Click Update System.

          After the system update is complete, you can view the log file name, type, and size in the archived log list. The access logs are automatically saved to the wwwlogs directory of your Web Hosting instance. You can use an FTP tool to download the log files and view the details.

          Important

          The server restarts during the system update, which may cause temporary website access failures. Do not leave the page or perform any other operations. Wait for about 30 to 300 seconds.

    2. Connect to the Web Hosting instance using FTP.

      For more information, see Manage files with FileZilla.

    3. In the logs directory of your Web Hosting instance, navigate to the wwwlogs folder, right-click the access log you want to download, and then click Download.

      Important

      The access logs on the Archived Log tab do not consume your web space. You do not need to delete them from this tab.

Windows OS instances

This procedure uses a Basic Enhanced Edition dedicated web hosting instance that runs a Windows operating system as an example. The interface for other instance types may differ. The actual interface may vary.

  1. Log on to the Cloud Web Hosting management page.
  2. Find the Cloud Web Hosting instance you want to manage and click Manage in the Actions column.
  3. In the navigation pane on the left, choose File Management > Website Logs.
  4. Download the website logs to the wwwlogs directory of the Web Hosting instance.

    Log files in the wwwlogs directory can be accessed and downloaded over the Internet but are not automatically deleted by the system. You must delete them manually.

    • Download a single log file

      1. On the Website Log page, find the individual website log to download.

      2. Click Download in the Actions column.

      3. In the dialog box that appears, click Confirm.

    • Download multiple log files

      1. On the Website Log page, select the multiple website logs that you want to download.

      2. Click Download at the bottom of the page.

      3. In the dialog box that appears, click Confirm.

  5. Connect to the Web Hosting instance using an FTP client.

    For more information, see Manage files with FileZilla.

  6. Open the wwwlogs directory to see the downloaded logs. The log files are stored in RAR format with the naming convention exYYMMDD.log.rar, such as ex201216.log.rar.

  7. Download the website logs to a local directory.

Related topics