How to Reinstall apache2 properly in Debian/Ubuntu

Last Updated on Wednesday, 05 September 2012 14:57 Written by Admin Wednesday, 05 September 2012 14:40

Print

 

 

If you have issues with apache2 and you want to reinstall it but you are getting errors,then here it isthe solution for you.

i had an issue with apache, when i tried to start it i got this error message.

 /etc/init.d/apache2   start.: 45: Can't open /etc/apache2/envvars

i need to remove it completely.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
sudo apt-get install apache2

check your apache2
dpkg -l | grep apache2