DirectAdmin

Read website logs and statistics in DirectAdmin

View access and error logs, bandwidth and disk usage, and AWStats or Webalizer statistics in DirectAdmin, and use them to find errors, bots and traffic spikes.

IntermediateDirectAdmin2 min read

DirectAdmin records every request to your websites and every server-side error. Those logs, plus the AWStats statistics built from them, answer questions like "why does my site show a 500 error?", "who is using all my bandwidth?" and "how many visitors came last month?".

Before you start

  • Your DirectAdmin user login and the domain selected at the top.
  • The time when a problem happened, to find it quickly in the logs.

Open the logs

  1. Go to System Info & Files → Site Summary / Statistics / Logs (in some versions Domain Setup → domain → Logs).
  2. Choose Show Log next to Error Log or Access Log to view the last lines, or Download for the full file.
  3. Log files are also in ~/domains/example.com/logs/ and in the server's /var/log/httpd/domains/ (readable by the admin).

    Read the error log

    MessageUsual cause
    PHP Fatal error … on line NA code or plugin bug at that file and line
    Allowed memory size exhaustedPHP memory limit too low or a memory leak
    Invalid command / .htaccessUnsupported directive in .htaccess
    client denied by server configurationAccess rules or permissions
    ModSecurity: Access denied … id "N"A WAF rule blocked the request; ask the host to review rule N

    Read the access log

    Each line shows the visitor IP, time, request, status code, size, referrer and user agent. Over SSH you can summarise it quickly:

    awk '{print $1}' ~/domains/example.com/logs/*.log | sort | uniq -c | sort -n | tail

    This lists the IPs with the most requests – often a bot or attacker. Count status codes with awk '{print $9}' file | sort | uniq -c to spot many 404s or 500s.

    AWStats statistics

    1. On the same Site Summary page, click AWStats (or Webalizer, depending on the server).
    2. Choose the month to see unique visitors, page views, bandwidth, top pages, countries, browsers, referrers and search keywords.
    3. Look at Robots/Spiders visitors to see how much traffic bots generate.

    AWStats updates once a day from the logs, so today's traffic appears tomorrow. For marketing analytics, a tool like Google Analytics or a privacy-friendly alternative complements it.

    Bandwidth and disk usage

    The DirectAdmin dashboard shows bandwidth and disk usage against your package limits. System Info & Files → Disk Usage breaks disk down by area (website files, email, databases). If you are near a limit, remove old backups and large logs, or upgrade your plan.

    Troubleshooting

    • Error log empty: PHP may log to error_log files inside site folders instead; search with find ~/domains -name error_log.
    • Statistics not updating: stats are disabled for the domain or the daily job failed; ask your host.
    • Bandwidth spike: check the top IPs and user agents; block bad bots in .htaccess or ask support for a firewall block.

    Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.