SOLVED] Apache2 won't start after "cleaning" cache and logs with Stacer

Started by kalpana, Nov 07, 2023, 03:41 AM

Previous topic - Next topic

kalpana

Be warned that Stacer doesn't just free up hard drive space. It completely removes the /var/log/mysql and /var/log/apache2 directories! Apache2 won't start until these directories and their associated log files are recreated.

I am posting this here, because I cannot believe that such a seemingly refined and widely used app does so much damage. Anyway, if you, like me, used Stacer to free up hard drive space by "cleaning" app logs. You can easily rebuild your log structure and restart your services using the following commands:

Code:
sudo mkdir /var/log/mysql
sudo touch /var/log/mysql/error.log
sudo chown -R mysql:mysql /var/log/mysql
sudo systemctl restart mysql

sudo mkdir /var/log/apache2/
sudo touch /var/log/apache2/{access,error,other_vhosts_access,suexec}.log
sudo chown -R root:adm /var/log/apache2/
sudo chmod -R 750 /var/log/apache2
sudo systemctl restart apache2