1

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.

1

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.

There might be better ways to accomplish it, but in general, this approach would always lead you in the right direction, at the very least.

  • Thank you for the help! I have the problem fixed now... whew. :) – David Jul 16 '13 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.