Installation Steps
1. Install GeoIP Module
GeoIP is used for geographic data analysis.
2. Install GeoIP Database
Download and set up the GeoIP database to map IPs to geographic locations.
3. Install Ncurses Module
Ncurses is required for terminal UI capabilities.
4. Install GoAccess
Download and install GoAccess with GeoIP and UTF-8 support.
Run GoAccess
Run GoAccess with the following command to analyze a log file and generate an HTML report with real-time updates:
Important Notes
Serve
report.html
via a Web Server:
Thereport.html
file contains logic for communicating with the WebSocket server launched by GoAccess. To make the report accessible, it needs to be served by a web server (e.g., Nginx, Apache).Nginx Example Configuration:
Set up an alias for serving thereport.html
file.
Key Features
- Real-time updates through WebSocket connections.
- Detailed analysis of web logs, including:
- Top visitors.
- Traffic by IP or country (with GeoIP).
- Most requested resources.
- HTTP status codes.
- Bandwidth usage.
By following these steps, you can efficiently set up GoAccess to monitor and analyze your server logs with real-time visual reports.