Overview
This page lists the log file locations for all major Centmin Mod components. Also see FAQ item #19 and the full Configuration Files reference for related information.
Nginx Log Files
Main Nginx Logs
| Log Type | Location |
|---|---|
| Error Log | /var/log/nginx/error.log |
| Access Log | /var/log/nginx/access.log |
| Default localhost Error | /var/log/nginx/localhost.error.log |
| Default localhost Access | /var/log/nginx/localhost.access.log |
Per-Vhost Nginx Logs
Each Nginx vhost domain has its own dedicated log directory:
/home/nginx/domains/domain.com/log/access.log
/home/nginx/domains/domain.com/log/error.log
For more information on Nginx configuration, see the Nginx documentation page.
PHP-FPM Log Files
| Log Type | Location |
|---|---|
| PHP-FPM Error Log | /var/log/php-fpm/www-error.log |
| PHP-FPM Slow Log | /var/log/php-fpm/www-slow.log |
| PHP-FPM Main Log | /var/log/php-fpm/php-fpm.log |
| Centmin Mod PHP Logs | /home/nginx/domains/domain.com/log/php_slow_log.log |
The PHP-FPM slow log records requests that exceed the configured request_slowlog_timeout threshold. This is useful for identifying slow PHP scripts. See the PHP-FPM documentation for configuration details.
MariaDB MySQL Log Files
| Log Type | Location |
|---|---|
| MariaDB Error Log | /var/log/mysqld.log |
| MariaDB Slow Query Log | /var/log/mysqld-slow.log |
| MariaDB Data Directory | /var/lib/mysql/ |
For MariaDB configuration and management, see the MariaDB MySQL documentation.
Pure-FTPD Log Files
| Log Type | Location |
|---|---|
| Pure-FTPD Log | /var/log/pureftpd.log |
| System Log (fallback) | /var/log/messages (filter with grep pure-ftpd) |
CSF Firewall Log Files
| Log Type | Location |
|---|---|
| LFD (Login Failure Daemon) | /var/log/lfd.log |
| iptables/Firewall Log | /var/log/messages |
System Log Files
| Log Type | Location |
|---|---|
| System Messages | /var/log/messages |
| Kernel Log | /var/log/dmesg |
| Secure/Auth Log | /var/log/secure |
| Cron Log | /var/log/cron |
| YUM Package Manager | /var/log/yum.log |
Centmin Mod Logs
| Log Type | Location |
|---|---|
| Centmin Mod Install Log | /root/centminlogs/ |
| centmin.sh Menu Log | /root/centminlogs/centminmod_menuopt_*.log |
Viewing Log Files
Common commands for viewing and monitoring log files:
View Last N Lines
# View last 25 lines of Nginx error log
tail -25 /var/log/nginx/error.log
# View last 50 lines of PHP-FPM error log
tail -50 /var/log/php-fpm/www-error.log
# View last 25 lines of MariaDB error log
tail -25 /var/log/mysqld.log
Follow Logs in Real Time
# Follow Nginx error log in real time (Ctrl+C to stop)
tail -f /var/log/nginx/error.log
# Follow multiple logs simultaneously
tail -f /var/log/nginx/error.log /var/log/php-fpm/www-error.log
Search Logs
# Search for error patterns in Nginx logs
grep "error" /var/log/nginx/error.log
# Search Pure-FTPD entries in system log
grep pure-ftpd /var/log/messages | tail -25
# Search for 500 errors in vhost access log
grep " 500 " /home/nginx/domains/domain.com/log/access.log
Log Rotation
Centmin Mod configures logrotate for all major services to prevent log files from consuming excessive disk space. Rotated logs are compressed and retained for a configurable number of days.
Logrotate Configuration Files
/etc/logrotate.d/nginx
/etc/logrotate.d/php-fpm
/etc/logrotate.d/mysql
/etc/logrotate.d/pureftpd
Rotated log files are compressed with gzip and typically have the .gz extension. Use zcat or zgrep to read them without manually decompressing.