Bobcares

Restore or Import Webalizer Logs for the Domain

by | Oct 3, 2021

Wondering how to restore or import Webalizer logs for the domain? We can help you.

The easy way to perform this is via the command line.

As part of our Server Management Services, we assist our customers with several Webalizer queries.

Today, let us see how our tech performs this task for our customers.

 

Restore or Import Webalizer Logs for the Domain

The Webalizer is web log analysis software, which generates web pages of analysis, from access and usage logs.

In addition, it is one of the most common web server administration tools.

We can utilize the Webalizer binary and import them from the command line.

To do so, we need to replace $user with the appropriate cPanel user and $domain with the appropriate domain.

However, in the case of HTTP, we need to import this into the Webalizer folder, and for SSL, it needs to use “webalizer/ssl/domain.com”.

Moving ahead, let us see how our Support Techs perform the same.

For Non-SSL:

gunzip -c
/home/$user/logs/$domain.tld-Mon-YYYY.gz |
/usr/local/cpanel/3rdparty/bin/webalizer -p -n $domain -o
/home/$user/tmp/webalizer/$domain.com/stats

Then for SSL:

gunzip -c
/home/$user/logs/$domain.tld-ssl_log-Mon-YYYY.gz |
/usr/local/cpanel/3rdparty/bin/webalizer -p -n $domain -o
/home/$user/tmp/webalizer/ssl/$domain.com/stats

Now, to update the Webalizer logs, our Support Techs run the following commands:

For Non-SSL:

/usr/local/cpanel/3rdparty/bin/webalizer -d
-T -N 10 -D /home/$user/tmp/webalizer/dns_cache.db
-R 250 -p -n $domain
-o /home/$user/tmp/webalizer/ /usr/local/apache/domlogs/$domain

Similarly, for SSL:

/usr/local/cpanel/3rdparty/bin/webalizer -d
-T -N 10 -D /home/$user/tmp/webalizer/dns_cache.db
-R 250 -p -n $domain
-o /home/$user/tmp/webalizer/
/usr/local/apache/domlogs/$domain-ssl_log.

Here, the /home/$user/tmp/webalizer/$domain.com/stats and /home/$user/tmp/webalizer/ssl/$domain.com/stats are directories.

Finally, after successfully running the above commands, we run:

/scripts/runweblogs $user

[Stuck in between? We’d be glad to help you out]

 

Conclusion

In short, we can restore or import Webalizer Logs from the command line. Today, we saw how our Support Techs perform the same for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.