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
- Go to System Info & Files → Site Summary / Statistics / Logs (in some versions Domain Setup → domain → Logs).
- Choose Show Log next to Error Log or Access Log to view the last lines, or Download for the full file.
- On the same Site Summary page, click AWStats (or Webalizer, depending on the server).
- Choose the month to see unique visitors, page views, bandwidth, top pages, countries, browsers, referrers and search keywords.
- Look at Robots/Spiders visitors to see how much traffic bots generate.
- Error log empty: PHP may log to
error_logfiles inside site folders instead; search withfind ~/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
.htaccessor ask support for a firewall block.
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
| Message | Usual cause |
|---|---|
| PHP Fatal error … on line N | A code or plugin bug at that file and line |
| Allowed memory size exhausted | PHP memory limit too low or a memory leak |
| Invalid command / .htaccess | Unsupported directive in .htaccess |
| client denied by server configuration | Access 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 | tailThis 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
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.
