# LAMP stack installation. Accidental deletion of ports.conf

I have Ubuntu 12.04 and tried to install Apache/PHP/MySQL with the default LAMP stack using tasksel.

Everything went well until I was going to edit the /etc/apache2/ports.conf file according to the ApacheMySQLPHP guide. I unintentionally deleted the contents of the document because I had not first changed the file's permissions.

Now, I cannot figure out how to restore the file to its original state.

I tried reinstalling the programs, but it had no effect, as Apache is still installed and running.

In general, I'd use the apt-file command (needs to be installed) to search for /etc/apache2/ports.conf: apt-file search ports.conf. This will provide a list of packages, one being apache2.2-common. So now you know which package provides the file you're looking to replace. Then you can either reinstall that package or download it and look at its content manually.