I failed to install lamp and I have deleted /etc/apache2/ .The reinstallation of lamp does not add this directory
Anyone can help me how to reinstall this apache2 folder?
I used sudo rm -rf /etc/apache2 in stead of sudo apt-get remove apache2
any idea how to reinstall /etc/apache2?
Now, when running sudo service apache2 start
$/etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars
How to Fix:
It really simple .
You got this error message : /etc/init.d/apache2: 51: .: Can’t open /etc/apache2/envvars
If you currently have it removed improperly, reinstall it by “sudo apt-get install apache2″ before to use the command bellow. To do that i will use this command :
$sudo apt-get remove --purge apache2 apache2-utils
This command will completely remove all apache2 configuration files and directories.
– Reinstall again apache using the normal command
Now your config files and directories in /etc/apache2 all be back and at their defaults as well as the “apache2-utils previously removed.
$sudo apt-get install apache2 $/etc/init.d/apache2 start