dammIT

A rantbox by Michiel Scholten

Broken websites in Apache2 (on Debian)


Recently some of my websites suddenly stopped working correctly. They all showed a dirlisting with an Apache 'it works' html page linked inside. That was... interesting.

I was confused for a bit, as I had not changed their configurations for quite a bit. What did change, was the Apache version on the Debian host they sit on. It was only a minor update, but the Debian changelog mentioned switching (finally) to systemd for the Apache2 start-up and such. I looked into it all, but could not find changes that would cause the websites to fail. Some of those sites are created in PHP (one of the reasons this host is still on Apache), but that also seemed to be installed and configured just fine.

It took me a few days of fruitless searching, tinkering (off and on), but in the end I noticed a remark about security being tightened and something something serving from homedirs not allowed any more. Hm, homedir.

The configuration files of these websites are committed to a private Git repository, so I can keep track of changes and such. Guess where the checkout directory of that Git repo was located? Yes, inside a home directory. After moving the checkout to a more logical location and recreating a bunch of symlinks, I restarted Apache and everything was back to normal.

article header image
article header image