In this article, you will learn about viewing the Access and Error logs of your Application using the Cloudways Platform. Here, access logs refer to the logs of Apache (for dynamic requests such as PHP requests), NGINX (for static assets such as images/JS/CSS), and PHP (detailed PHP process information such as files/routes, CPU, and memory consumption). On the other hand, error logs refer to the Apache Error Logs that contain information about the issues that an application encounters, and this may contain details of errors and warnings that indicate potential problems with an event or application configuration.

Analyzing logs can be beneficial when it comes to debugging, troubleshooting the application-level issues, and maintaining a good website’s health because logs provide information about web requests, the status of requests, visitor’s IP addresses, viewed pages, user-agent(s), PHP processes, CPU, and memory consumption.

How to View Access & Error Logs

Application logs can be monitored effortlessly using the Cloudways Platform or by remotely connecting the server via SSH/SFTP. This is a very recent value addition done by Cloudways to enable the functionality of viewing the application logs directly from the Cloudways Platform without having to connect to the server, so here is how you can do it.

Important

If you use Cloudflare or Sucuri, then you need to select Cloudflare or Sucuri under WAF Module in the server settings because it will allow you to view the real IP addresses of the visitors visiting your site. Cloudflare and Sucuri are very well-known reverse-proxy services. When opting for their services, you update your default nameservers with their nameservers, point DNS records to them, and then traffic is routed to your website hosted on the Cloudways’ server.

Tip

The logs section of the Cloudways Platform will only display the recent 1000 log entries of Apache, NGINX, and PHP individually but if you are looking to view the previous logs as well, then you need to connect to your server via SSH/SFTP.

Step #1

Log in to the Cloudways Platform, click on the Servers tab from the top menu bar and choose your target server on which the desired application is deployed.

Next, click on the www icon located on the right-hand side of the server tab.

Select a target application from the drop-down list.

Step #2

Next, click on the Monitoring option from the left menu bar to expand it.

Next, click on the Logs to expand it as well.

Finally, you will see two options of Access Logs and Error Logs.

Access Logs

Now, upon clicking on the Access Logs, it will display the recent 1000 access log entries of your application, as mentioned earlier. By default, it will show a few logs, but you can drag the vertical slider across to view more.

  1. You can switch between the tabs to view the other access logs (e.g., for PHP and NGINX).

  2. The search box can be used to locate a specific log record in the given list.

  3. The filter can also be applied to the logs to narrow the search. The filter is only applicable to those methods (e.g., PUT, POST, etc.) and status codes (e.g., 200, 301, etc.) that are present in the last 1000 log entries.

  4. Most recent logs can be obtained by simply clicking on the refresh button.

Error Logs

Now, upon clicking on the Error Logs, it will display the recent 1000 Apache error logs of your application. By default, it will show a few logs, but you can drag the vertical slider across to view more.

  1. The search box can be used to locate a specific log record in the given list.

  2. The filter can also be applied to the logs to narrow the search. The filter is only applicable to those PHP errors (e.g., Fatal error, Parse error, etc.) that are present in your last 1000 log entries.

  3. Most recent logs can be obtained by simply clicking on the refresh button.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?