Webalizer is not working

Post Reply
Zakopet
Posts: 14
Joined: Tue Sep 28, 2021 2:54 pm

Webalizer is not working
I have enabled webalizer for my domain.
I have opened stat http://mydomain.com/vstats/
I got 403

Here mydomain.com.error.log
[Mon May 19 23:43:21.699821 2025] [autoindex:error] [pid 678496:tid 140227036722944] [client 83.9.117.133:0] AH01276: Cannot serve directory /home/user/web/mydomain.com/stats/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
billy478
Posts: 1
Joined: Tue Oct 14, 2025 11:00 pm

hey,
That 403 is just Apache saying “there’s no index file here and I won’t list the directory.” In other words, Webalizer hasn’t produced the HTML yet (or it wrote it somewhere else), so /home/user/web/mydomain.com/stats/ is empty from Apache’s point of view.

The quick fix is to make sure Webalizer actually generates into that folder, then run it once manually.

First, confirm where Webalizer is set to write. On most installs it’s in /etc/webalizer/webalizer.conf (or a per-domain conf under /etc/webalizer/ or /home/user/conf/web/). You want OutputDir to match:

OutputDir /home/user/web/mydomain.com/stats


Now force a one-time build. On myVesta/Vesta there’s a helper that builds stats for a specific domain:

sudo v-update-web-domain-stat user mydomain.com


If that command isn’t available on your box, call Webalizer directly, pointing it at the domain’s access log and the output directory:

sudo /usr/bin/webalizer \
-o /home/user/web/mydomain.com/stats \
-n mydomain.com \
/var/log/httpd/domains/mydomain.com.log


Some templates also use the .bytes file for totals; if you have it, add it with -b /var/log/httpd/domains/mydomain.com.bytes.

After that, you should see index.html and a bunch of usage_YYYYMM.html files inside /home/user/web/mydomain.com/stats/. If they’re there but you still get 403, it’s usually ownership/permissions—make sure the files are readable by the web server and the dir is executable:

sudo chown -R user:user /home/user/web/mydomain.com/stats
sudo find /home/user/web/mydomain.com/stats -type d -exec chmod 755 {} \;
sudo find /home/user/web/mydomain.com/stats -type f -exec chmod 644 {} \;


One more thing to check is that your /vstats alias actually points to that same path in the nginx/apache vhost. On myVesta, it’s commonly an alias to /home/user/web/<domain>/stats; if you’ve customized templates, make sure it isn’t pointing to /var/lib/webalizer or similar by mistake. Then reload services:

sudo systemctl reload nginx
sudo systemctl reload httpd # or apache2


If you’d rather not run it by hand every time, verify the daily cron is in place. Vesta/myVesta usually runs a nightly stats update; if it’s disabled, reenabling Webalizer for the domain in the panel will recreate that cron, or you can add a root cron calling v-update-web-stats (all domains) or v-update-web-domain-stat user mydomain.com.

Once index.html exists in /stats, the 403 goes away and http://mydomain.com/vstats/ will load.
Post Reply