Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I haven't updated a single piece of software, yet sometime in the past few days my Apache installation has broken.

Everything was installed using lamp-server and had been operating fine for the past three months. In Mods-Enabled the following symlinks were broken:

  • authn_file
  • authz_host
  • autoindex
  • alias

I ran sudo a2dismod for each, which reported that it "removed dangling symlink." The only module that is actually in mods-available is alias, the rest are missing. Apache will not start without authz_host.

Any ideas of what happened, or where I could find log files to see what happened, or how to get authz_host back? I have tried reinstalling Apache with synaptic, and that did not work.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The mods-available folder should contain lots of little one/two-line files that load (and sometimes configure) apache's modules. The modules libraries themselves are elsewhere.

The a2dismod you ran did what it should in that it removed a symlink that pointed to a non-existent file. You probably found that the following a2enmod failed.

It looks to me like someone accidentally deleted the contents (or most of the contents) of the mods-available folder. You won't find anything in the logs, if this is the case.

To restore, I'd advise you to backup your config folders (but leave them in place, too), then run apt-get install --reinstall lamp-server to reinstall the existing apps and default config files. The process should prompt you when it comes across files that conflict with your existing configuration. Opt to keep your own version (K) and you should end up with the missing files restored without losing your own customisations. (I say should, I meant what I said about the backup).

If you've installed subsequent, separate modules, then you'll need to apt-get install those, too.

share|improve this answer
    
Trying apt-get install --force lamp-server throws E: Command line option --force is not understood –  Nick Nov 2 '11 at 18:40
    
I think it should be --reinstall instead of --force –  DerfK Nov 2 '11 at 20:53
    
@Derfk: Correct, I was thinking of the dpkg invocation, rather than the apt-get one. I'll correct my answer. –  SmallClanger Nov 3 '11 at 11:37
add comment

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.