October 18, 2025
Directadmin file locations

DirectAdmin is a popular web hosting control panel used by web hosting companies to manage websites, databases, emails, and other services. One crucial aspect of managing a DirectAdmin server is understanding where to find various log files. Logs are essential for troubleshooting, monitoring, and maintaining the health of the server. This blog post will cover the various log file locations in DirectAdmin, their purposes, and how to access and interpret them.

Introduction to DirectAdmin Log Files

Directadmin control panel

Log files in DirectAdmin are used to record a variety of events and activities on the server. These logs can include information about user actions, server processes, errors, security incidents, and more. By examining these logs, administrators can identify issues, track user activity, and ensure the server is running smoothly.

Key Log File Locations in DirectAdmin

1. DirectAdmin Log Files

DirectAdmin itself generates several log files that are crucial for monitoring the control panel’s operations.

  • DirectAdmin Error Log:
    • Location: /var/log/directadmin/error.log
    • Purpose: This log records errors and warnings generated by DirectAdmin. It is essential for diagnosing issues with the control panel itself.
  • DirectAdmin System Log:
    • Location: /var/log/directadmin/system.log
    • Purpose: This log contains information about DirectAdmin’s activities, such as updates, backups, and other system-level events.
  • DirectAdmin Security Log:
    • Location: /var/log/directadmin/security.log
    • Purpose: This log records security-related events, including login attempts, failed logins, and other security incidents.

2. Apache Web Server Logs

Apache in directadmin

If your DirectAdmin server uses Apache as the web server, you’ll need to be familiar with the Apache log files.

  • Apache Access Log:
    • Location: /var/log/httpd/access_log or /var/log/apache2/access.log (depending on the OS)
    • Purpose: This log records all requests made to the web server, including the requested URLs, client IP addresses, and response codes.
  • Apache Error Log:
    • Location: /var/log/httpd/error_log or /var/log/apache2/error.log
    • Purpose: This log records any errors encountered by the Apache server, such as missing files, permission issues, and other problems.

3. NGINX Web Server Logs

nginix directadmin

If NGINX is used instead of Apache, the log file locations will be different.

  • NGINX Access Log:
    • Location: /var/log/nginx/access.log
    • Purpose: Similar to the Apache access log, this file records all requests made to the NGINX server.
  • NGINX Error Log:
    • Location: /var/log/nginx/error.log
    • Purpose: This log captures errors encountered by the NGINX server.

4. PHP Logs

php directadmin

PHP, being a server-side scripting language commonly used in web applications, also generates log files.

  • PHP Error Log:
    • Location: /var/log/php_errors.log (configured in php.ini)
    • Purpose: This log records errors and warnings generated by PHP scripts.

5. MySQL Logs

Databases are a critical part of most web applications, and MySQL is a popular choice.

  • MySQL Error Log:
    • Location: /var/log/mysqld.log or /var/log/mysql/error.log
    • Purpose: This log captures errors encountered by the MySQL server.
  • MySQL Query Log:
    • Location: /var/log/mysql/mysql.log
    • Purpose: This log records all queries executed by the MySQL server. Note that enabling this log can impact performance and should be used cautiously.
  • MySQL Slow Query Log:
    • Location: /var/log/mysql/slow.log
    • Purpose: This log records queries that take longer than a specified duration to execute, helping identify performance bottlenecks.

6. Exim Mail Server Logs

exim-mail-server

DirectAdmin uses Exim as the mail server, and monitoring email activities is crucial for maintaining email services.

  • Exim Main Log:
    • Location: /var/log/exim/mainlog
    • Purpose: This log records all email transactions, including successful deliveries and failures.
  • Exim Panic Log:
    • Location: /var/log/exim/paniclog
    • Purpose: This log records critical errors that could cause Exim to stop functioning.
  • Exim Reject Log:
    • Location: /var/log/exim/rejectlog
    • Purpose: This log records email messages that were rejected due to policy violations or other issues.

7. Dovecot Mail Server Logs

If Dovecot is used for IMAP and POP3 services, you’ll need to know where its logs are located.

  • Dovecot Log:
    • Location: /var/log/dovecot.log
    • Purpose: This log records all Dovecot-related activities, including user logins and mail accesses.
  • Dovecot Error Log:
    • Location: /var/log/dovecot.err
    • Purpose: This log captures errors encountered by Dovecot.

8. ProFTPD Logs

DirectAdmin uses ProFTPD for FTP services.

  • ProFTPD Access Log:
    • Location: /var/log/proftpd/access.log
    • Purpose: This log records all FTP transactions, including file uploads and downloads.
  • ProFTPD Auth Log:
    • Location: /var/log/proftpd/auth.log
    • Purpose: This log records authentication attempts, both successful and failed.

9. System Logs

system logs - Directadmin

In addition to application-specific logs, it’s important to monitor general system logs.

  • Syslog:
    • Location: /var/log/syslog (Debian-based systems) or /var/log/messages (RHEL-based systems)
    • Purpose: This log records system-wide messages, including kernel logs, startup messages, and other system events.
  • Auth Log:
    • Location: /var/log/auth.log
    • Purpose: This log records authentication attempts, both successful and failed, across all services.

10. Cron Logs

Cron jobs are used to schedule tasks on the server.

  • Cron Log:
    • Location: /var/log/cron
    • Purpose: This log records all cron job executions, including any output or errors generated by the jobs.

Accessing and Managing Log Files

Viewing Log Files

To view log files, you can use various command-line tools. Here are some commonly used commands:

  • cat: Display the entire content of a log file.
    cat /var/log/directadmin/error.log
  • tail: Display the last few lines of a log file, useful for viewing recent entries.
    tail /var/log/httpd/access_log
  • tail -f: Continuously display new entries added to a log file in real-time.
    tail -f /var/log/nginx/error.log
  • less: View the log file with pagination and searching capabilities.
    less /var/log/syslog
  • grep: Search for specific entries within a log file.
    grep "error" /var/log/mysql/error.log

Monitoring Log Files

To effectively monitor log files and respond to critical events, you can use tools like:

  • Logwatch: Summarizes and reports on system logs.
  • Logcheck: Actively scans log files and emails reports on unusual entries.
  • ELK Stack (Elasticsearch, Logstash, Kibana): A powerful suite for centralized log management and analysis.

Conclusion

Understanding and managing log files in DirectAdmin is essential for maintaining a secure and reliable server environment. By knowing where to find these logs and how to interpret them, administrators can effectively troubleshoot issues, monitor server performance, and ensure the overall health of their systems.

Regular log review and management practices, including log rotation and monitoring, are crucial for efficient server administration. By implementing these practices, administrators can proactively address potential issues and maintain a robust hosting environment.

Whether you are a seasoned server administrator or new to DirectAdmin, this guide provides a comprehensive overview of the key log file locations and their purposes. Keep this reference handy to streamline your server management tasks and enhance your DirectAdmin experience.