PDA

View Full Version : [SOLVED] How to reset apache2 back to default



hkl@hkl.no
December 4th, 2008, 04:56 PM
Anyone

have been playing around with my apache, and would like it reset back to "default" to start all over with my setup.

do I need to remove or reinstall with an "overwrite" config option or ???

:confused:

Thanks in advance

hkl

dasunst3r
December 4th, 2008, 04:58 PM
Perhaps you can go something like this:

sudo apt-get --purge remove apache2 The --purge option will delete configuration files again and uninstall Apache. Then install again.

hkl@hkl.no
December 4th, 2008, 08:59 PM
Sorry did not do the job, /etc/apache2/xxx was not touched by the un/reinstall.

Ended up reinstalling the server.

hkl

ki4jgt
November 9th, 2011, 10:25 PM
anyone know how to do this yet?

mcduck
November 10th, 2011, 09:01 AM
Yes. The "--purge" option for apt-get (or "Mark for complete removal" in Synaptic) should remove all system-wide configuration files for the package. Jsut make sure you actually remove the correct apache package.

...and in the end igf you have purged all apache packages and the config files still exist for some reason or other, just delete them yourself. That shouldn't happen, though, unless you actually forget to uninstall some apache package.

If you are messing with the settings, I would actually recommend making a backup of the original config files beforehands. Same goes for any config file, of course... :)

tsbartle
June 6th, 2012, 01:24 PM
First, you need to completely remove all apache2 config files and directories

sudo apt-get remove --purge apache2 apache2-utils

Then, reinstall apache2

sudo apt-get install apache2

That worked for me, hope it does the trick for you too.