Prerequisites
Before viewing access logs, make sure you have:
- SSH access to your VPS
- Domain added in HestiaCP
Access Log Locations
For Apache:
/home/admin/logs/example.com/access.log
For Nginx:
/home/admin/logs/example.com/access_nginx.log
View Access Logs via HestiaCP Web Interface
Step 1: Log in to HestiaCP
https://YOUR_SERVER_IP:8083
Step 2: Navigate to WEB Section
Click on WEB → your domain.
Step 3: Go to Statistics Tab
Click on Statistics tab to view basic request data.
View Access Logs via SSH
ssh hxroot@YOUR_SERVER_IP -p 22
View last 50 lines:
tail -50 /home/admin/logs/example.com/access.log
Follow in real-time:
tail -f /home/admin/logs/example.com/access.log
Analyze Access Logs
Find top IP addresses accessing your site:
cat access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -10
Find top requested pages:
cat access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20
Count total requests per day:
cat access.log | awk '{print $4}' | cut -d: -f1 | sort | uniq -c
Find response codes:
cat access.log | awk '{print $9}' | sort | uniq -c
Enable AWStats for Detailed Analytics
In HestiaCP, go to WEB → your domain → Statistics → Install AWStats.
Access via: https://example.com/awstats/awstats.pl
✅ Access logs are now visible for analysis.