I removed apache by mistake all configs are lost can I reinstall with hestia?

I want to install apache2 and nginx again without losing my wordpress data.
I tried to install them manually but they gave errors:

sudo systemctl start nginx
Oct 31 10:47:48 dzagame.com nginx[3703]: nginx: [emerg] open() "/var/log/apache2/domains/233696.fornex.cloud.error.log" failed (2: No such file>

the directory “domains” is gone and my website is down I cannot access hestia from the web, I can only access the vps ssh shell

But what did you remove? The Apache packages or the dir /etc/apache2/?

Regarding the log error:

mkdir -p /var/log/apache2/domains
chown root:adm /var/log/apache2/
chown root:root /var/log/apache2/domains/
chmod 751 /var/log/apache2/
chmod 751 /var/log/apache2/domains/

Why? Hestia uses another nginx instance so you should be able to access Hestia.

I would say that no problem, recover /etc/apache2/ dir from your backups but I suppose you don’t have a backup, right?

If you don’t have your own backup, maybe you could use the one made when you last updated Hestia:

/root/hst_backups/HereTheDateOfLastUpdate/conf/apache2/
1 Like