Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

So I was fiddling around on my server the other day and deleted mod_rewrite from the mods-available folder instead of the mods-enabled folder.

Is there a place I can download the missing files in order to reinstall? I've tried google but all results are just for enabling mod_rewrite and writing rewrite rules.

Maybe I should try something like: sudo apt-install apache --reinstall??

Thanks. :)

share|improve this question
that's why you should use a2enmod/a2dismod a2ensite/a2dissite in the future and always backup your /etc dir at least :) – shakalandy Apr 11 '11 at 14:46
up vote 0 down vote accepted

aptitude reinstall apache2-mod_rewrite (or something like that, do apt-get search rewrite)

share|improve this answer
I don't believe mod_rewrite is a separate package, it should be a part of the core apache install package. – rfelsburg Apr 11 '11 at 14:39
You are right, my mistake. It's part of apache2 – Jure1873 Apr 11 '11 at 14:40

sudo apt-install apache --reinstall

should work, make sure you back up your existing configuration files, and directories.

share|improve this answer

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.