Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I uninstalled apache2 on debian 5 64bit. Then I removed /etc/apache2 and reinstalled apache again. That folder is still missing and I have no idea how to get the apache files back (with modules and etc).

How do I restore everything?

share|improve this question
What package did you exactly remove? And if you do dpkg -l | grep apache? – Pier Jul 13 '10 at 9:15
Debian does not install apache2 in /var/ . For example, you will find the modules in /usr/lib/apache2/modules (If you used official .deb packages) – artifex Jul 13 '10 at 9:22
i meant /etc/apache2. doing /etc/init.d/apache2 restart ATM causes the error /etc/init.d/apache2: line 44: /etc/apache2/envvars: No such file or directory – acidzombie24 Jul 13 '10 at 9:48
up vote 5 down vote accepted

Cpf's idea should work, but, the config files are in the apache2.2-common package, not in the apache2 package.

You can check what package owns a file with dpkg.

dpkg -S /etc/apache2/envvars
apache2.2-common: /etc/apache2/envvars
share|improve this answer
ahh! that works! thanks – acidzombie24 Jul 13 '10 at 10:18

You might try to completely remove (purge) apache, clean the local archives, and try to install it again:

# aptitude purge apache2
# aptitude clean
# aptitude install apache2
share|improve this answer
No luck. 7 more to go.. – acidzombie24 Jul 13 '10 at 9:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.