I have removed the folder /etc/apache2 to reset its configuration, but when I reinstall Apache2 it is not coming back. Could anybody please explain this to me?

link|improve this question
feedback

2 Answers

up vote 3 down vote accepted

apache2.2-common packages contain config. Reinstall apache2.2-common:

sudo apt-get --reinstall install apache2.2-common

or use autoremove(remove satisfy dependencies):

sudo apt-get remove apache2
sudo apt-get autoremove
sudo apt-get install apache2
link|improve this answer
Thanks, worked like a charm! – Z0q Mar 1 '11 at 9:29
feedback

Try doing

apt-get --reinstall install apache2.2-common -o DPkg::options::="--force-confmiss"

This will reinstall all configuration files from apache2.2-common that are missing.

Just reinstalling the package will not reinstall the configuration files.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown