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

When updating apache 2.2 to apache 2.4 (for example with this package https://launchpad.net/~ondrej/+archive/apache2) all the configs are deleted. The normally used

/etc/apache2/sites-available/default

is now completely deleted, the "new" default file (000-default) has a totally different structure, so it's not even possible to recover by doing copy & paste work.

Why does this happen and how to prevent this ?

share|improve this question

Report a bug to the team. They shouldn't destroy you configurations. They should ask you what should be done. To be sure, check if there is a backup file named "default.dpkg-old" (or similar, I don't remember exactly the name, I remove them after checking that all is working).

share|improve this answer

I'd suggest using the sites-available directory in the way it was intended rather than complaining (understandably though) about the packager overwriting the default vhost.

Put the VirtualHost declarations in seperate files in /etc/apache2/sites-available and enable them with a2ensite. Don't forget to disable default with a2dissite.

share|improve this answer

Your Answer

 
discard

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.