how reinstall apache2? [duplicate]

Solution 1:

First:

sudo apt-get --purge remove apache2
sudo apt-get autoremove

Then installing apache2 is as simple as:

sudo apt-get install apache2
sudo /etc/init.d/apache2 restart

To test it:

lynx "http://localhost"
  • More information on configuration Apache (Ubuntu 13.10)