/var/log/apache2/domlogs/proxy-subdomains-vhost.localhost too large

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,302
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hello guys. In several old servers, the /var/log/apache2/domlogs/proxy-subdomains-vhost.localhost file is using several GB of disk space, saving data since 2018 or 2016.... Can I use truncate command to.... truncate this file? Or should I take some care before, like stopping Apache service? If there is a safe way to do it, please give advice.

Thanks in advance!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,630
363
cPanel Access Level
Root Administrator

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,302
68
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Ok, I'm adding this command as a server cronjob, running every 3 months. Should be enough, right?

truncate -s 20M /var/log/apache2/domlogs/proxy-subdomains-vhost.localhost && service httpd restart