# New Apache2.2 installation overwrites index.html (Windows)

I've just updated my Apache2 (v2.2.21) installation on Windows - first uninstall the old version and then install the new one. Afterwards, I was very badly surprised when instead of my default (and quite large) index.html I've found a very "useful" It works! index file instead...

Even though the manual clearly says:

Also, if you already have a file called htdocs\index.html, it will not be overwritten (and no index.html.default will be installed either). This means it should be safe to install Apache over an existing installation, although you would have to stop the existing running server before doing the installation, and then start the new one after the installation is finished.

Unfortunately, my last backup of this file is not very recent and a lot of work went into it in between.
So - what did I do wrong? Or is it a bug on Apache's side? Or even better, might I be able to recover the file somehow?
The config files were not overwritten.

-

If you're running windows 7... you might get lucky with "Previous Versions". Simply right-click the folder it's in... click on properties... and then click on the previous versions tab... and then select a version of that folder from before you did the uninstall... and restore the missing files you need.

I think your mistake was doing the uninstall before re-installing the newer version. (I'm not 100% sure on this tho...)

-
You're my hero! :D I've never used this function before, didn't even know it's there. But the file was! Thanks! –  Czechnology Jan 6 '12 at 20:37
I've tried installing the new version over the old one first but the setup asked me to uninstall the old one first. –  Czechnology Jan 6 '12 at 20:38
Good to know. That might be a good thing to throw at the apache devs so they'll fix it in future versions. And yes... "Previous Versions" is the best thing since sliced bread imho. –  TheCompWiz Jan 6 '12 at 21:09

What you did wrong might sound a bit harsh, but you didn't make a backup.

You might want to check the trash folder. Maybe the routine just moved it. In case it hasn't you at least have learned to backup BEFORE update. (I learned it myself some time ago, you are not alone)

-
To say the truth, I've tried to backup the whole htdocs dir but the system somehow took ages to do that and I got impatient. Yeah, I know... Anyway, nothing found in the trash and nothing with "undelete" utilities. –  Czechnology Jan 6 '12 at 20:34