kdebase pulls in www-misc/htdig. htdig, as part of its install, places files in /var/www/localhost/. This normally wouldn't cause a problem, but when a webserver (e.g. Apache) is installed and running, these files and scripts can be accessed externally. There should be a way to disable this behavior, ideally as the default. Reproducible: Always
Looks like htdig can be configured to for a different directory: http://www.htdig.org/config.html
Actually there is not file collision the gentoo apache config script just looks for files in /var/www/localhost/ if it sees any it aborts. Probably should be fixed.
Closing, as per last comment.