CWP Log Paths Updated on July 8, 2024 by Derrell 3 Minutes, 17 Seconds to Read Logs are essential for server management, providing detailed records of activities and events that occur on your server. In Control Web Panel (CWP), logs are crucial for diagnosing issues, monitoring system performance, and ensuring security. This article provides a comprehensive guide to the log paths in CWP, helping you locate and understand the various logs available. Understanding Log Files System Logs Apache Logs Nginx Logs Mail Logs CWP-Specific Logs MySQL/MariaDB Logs SSL Let’s Encrypt Logs Conclusion Understanding Log Files Log files are records of events and messages generated by your server’s operating system, services, and applications. They include information on errors, access attempts, system warnings, and more. By regularly reviewing these logs, administrators can troubleshoot issues, enhance security, and maintain optimal server performance. System Logs Logs from the system itself, services, and various applications running on the system are located within /var/log. Examples of logs located in this directory include: /var/log/messages Purpose: General system log Information it contains: System messages, warnings, errors, FTP, BIND/Named /var/log/secure Purpose: Information related to authentication and authorization. Information it contains: Authentication logs, login attempts, SSH /var/log/lfd.log Purpose: CSF & LFD Firewall log Information it contains: Failed login attempts, IP addresses that have been blocked by CSF /var/log/cwp_client_login.log Purpose: Admin login log Information it contains: Failed and successful logins to CWP Admin Panel Apache Logs The logs for Apache are located in /usr/local/apache/logs (main logs) and /usr/local/apache/domlogs (per domain). Examples of logs in this directory include: /usr/local/apache/logs/access_log Purpose: Apache access log Information it contains: HTTP requests to the web server /usr/local/apache/logs/error_log Purpose: Apache error log Information it contains: Server errors, warnings /usr/local/apache/domlogs/$DOMAIN.COM.error.log Replace $DOMAIN.COM with the actual domain name Purpose: Domain-specific error log Information it contains: Errors thrown by the website/application, Mod Security errors, SSL warnings/errors Nginx Logs (if applicable) The logs for Nginx are located within /var/log/nginx. Examples of logs within this directory include: /var/log/nginx/access.log Purpose: Nginx access log Information it contains: Requests processed by Nginx /var/log/nginx/error.log Purpose: Nginx error log Information it contains: Errors encountered by Nginx Mail Logs /var/log/maillog Purpose: Mail server log Information it contains: Email transactions, SMTP, delivery issues /var/log/dovecot.log Purpose: Dovecot error log Information it contains: Warning and error messages for IMAP/POP3 connections for Dovecot /var/log/dovecot-info.log Purpose: Dovecot information log Information it contains: Informative messages such as failed and successful logins for IMAP/POP3 connections for Dovecot CWP-Specific Logs CWP-specific server and server services logs are located in usr/local/cwpsrv/logs/ and /usr/local/cwp/php*/var/log/. Example logs located in these directories include: /usr/local/cwpsrv/logs/error_log Purpose: CWP web server error log Information it contains: Errors related to the CWP interface /usr/local/cwpsrv/logs/access_log Purpose: CWP web server access log Information it contains: Access records for the CWP interface /usr/local/cwpsrv/var/services/roundcube/logs/ Purpose: Roundcube log directory Information it contains: Roundcube mail transactions, failed logins MySQL/MariaDB Logs /var/lib/mysql/$HOSTNAME.err Replace $HOSTNAME with the server’s actual hostname Purpose: MySQL error log Information it contains: Root causes for MySQL/MariaDB errors SSL Let’s Encrypt Logs /var/log/cwp/autossl.log Purpose: AutoSSL log Information it contains: All transactions performed by AutoSSL, including installation and removal of AutoSSLs. /root/.acme.sh/acme.sh.log Purpose: ACME.sh log Information it contains: Output from the acme.sh Let’s Encrypt shell script that is used to issue and renew free certificates automatically. Conclusion Understanding and managing log files in CWP is essential for maintaining server health and security. By regularly monitoring logs, you can diagnose issues promptly and ensure your server operates smoothly. Scalable VPS Infrastructure, Fully Managed When shared hosting can't handle your traffic, VPS delivers dedicated resources that scale with demand. Our team manages the technical complexity while you manage your business. NVMe Storage High-Availability Ironclad Security Premium Support VPS Hosting Share this Article Derrell Willis Manager, Developer Relations More Articles by Derrell Related Articles CWP Log Paths ClamAV in Control Web Panel (CWP) Control Web Panel (CWP) Cron Jobs Control Web Panel (CWP) Backups
Here is a complete open-source solution which might be of interest – Apache Log Parser and Data Normalization Application https://github.com/WillTheFarmer/ApacheLogs2MySQL Imports Apache Access & Error logs into MySQL Schema of tables, functions & views designed to normalize data. Consolidate logs from multiple Servers and unlimited Domains with audit trail & error logging. Merry Christmas! Will