I still have no idea what causes this.
I discovered that it was only serving files from /Users/john
and not the rest of the file system (other than the correct document root for the server), so I assume it is something related to some clever OS X file sharing something something.
I checked for mod_userdir
, which was not enabled. I checked all Directory
and Location
sections, none of which seems to enable access to files under /Users/john
. Nothing in the configuration mentions john
specifically, and I can't find any regex that would match that either. It does not seem to be related to the file extension (it would kind of make sense to "serve all images" or something, but it wasn't that either.)
So what I ended up doing after many hours was add a <Location /Users>
section to my global httpd.conf
where I disabled access for everyone, like so:
<Location "/Users">
Order Deny,Allow
Deny from all
</Location>
(Which is exactly what my <Directory />
section looks like too, for the record.)
This isn't the best of solutions but it appears to deny access to files which shouldn't be served.
Since this was what worked for me, I'll accept it as the answer. I'm thankful for the help given to me by Safado, and if anyone else comes by in the future and has any clues, please post them! It's likely this server will be in service for at least a while longer, and I'd be happy to try out a more proper solution if one exists.
Edit: Apparently someone had put a symlink Users -> /Users
in the document root (I had previously ruled this out because it didn't serve any users' directories other than john
). I'm guessing maybe for some reason the www-data
user which runs Apache has filesystem permissions to read /Users/john
but not the other directories inside /Users
, but either way, removing the symlink solved my problem.