In this post we will cover the common errors and solutions for the Domain Access Logs section in OpenPanel interface.
Log file not found
If you encounter the "Log file not found" message while accessing the Domain Logs section for a specific domain, it indicates that the processing of Nginx access logs for that domain has not been completed. You have the option to trigger the process manually.
For all users:
opencli domains-stats
For a single user:
opencli domains-stats USERNAME
Example output:
Processing user: stefan
No excluded IPs file found for user stefan. Proceeding without IP exclusions.
[PARSING /var/log/nginx/domlogs/pejcic.rs.log] {0} @ {0/s}
Cleaning up resources...
Processed domain pejcic.rs for user stefan
Statistics is not displayed
If the generated report contains no data, either the domain name is not pointed to the server, in which case you should check the A or NS records for the domain on a tool like: https://www.whatsmydns.net/
Or the access log inside domain Nginx conf file is missing, to check, open the file:
nano /etc/nginx/sites-available/DOMAIN-NAME.TLD.conf
And make sure that there is an access_log
line in the first server block:
access_log /var/log/nginx/domlogs/DOMAIN_NAME.TLD.log;
Check that file to make sure that Nginx is collecting logs:
tail /var/log/nginx/domlogs/DOMAIN_NAME.TLD.lig
How to exclude my IP address
To exclude certain IP addresses from the generated reports, add them to the file /usr/local/panel/core/users/$USERNAME/domains/excluded_ips_for_goaccess
- one IP per row.
During the generation of each stats report, this file is checked and, if present, it will be read.
Processing user: stefan
Excluded IPs file found for user stefan
[PARSING /var/log/nginx/domlogs/pejcic.rs.log] {0} @ {0/s}
Cleaning up resources...
Processed domain pejcic.rs for user stefan with IP exclusions
How to customize reports
OpenPanel's Domain Access Logs are generated using the goaccess web log analyzer and to edit the configuration please first take a look at their Manual Page for a list of available options.
To edit the reports style or contents edit the goaccess.conf
main configuration file for goaccess.
nano /etc/goaccess/goaccess.conf