I've cleaned out the contents of my /var/www/localhost/htdocs directory to make way for various applications that I want to install in there to test on my local machine before uploading them to a production server. However, whenever I upgrade Apache it re-installs all the index.html.* files as well as the Apache logos etc. (i.e. all the files that come with a default install). It's not a problem for the initial install, but once I've put scripts etc. into the directory I don't want to have to be messing around trying to remove extra files each time I upgrade. I would much prefer it if either: a) there was an option not to install these files b) there was a script that checked for their existance and didn't install them if they'd been removed and this was an upgrade Reproducible: Always Steps to Reproduce: 1. emerge -u apache (or emerge -uD world when there is a new Apache version) Actual Results: The index.html.* and other files re-appear in /var/www/localhost/htdocs/
Whence updating apache, all the default files are dropped into the document root. These files include about six different images...and fifteen different index.xx.html files. It is as though you are installing from scratch...Any index.html file in the document root gets clobbered. When updating apache, it would be better not to install any files to the document root (/var/www/localhost/htdocs/).
Apache-2.0.52-r3 and -1.3.33-r1 both now use gentoo-webroot-default to install a default webroot in /var/www/localhost/htdocs. I have added a no-htdocs USE-flag to gentoo-webroot-default that causes it to place the webroot in it's docs directory (/usr/share/doc/gentoo-webroot-default-1.0/) and added a pkg_config option so you can install the webroot after the package is installed if you wish. Add the following to /etc/portage/package.use (create it if it doesn't exist): net-www/gentoo-webroot-default no-htdocs To use this new functionality, you will need to upgrade to the apache version that is currently hardmasked by following the instructions at http://dev.gentoo.org/~vericgar/package-refresh.txt and http://dev.gentoo.org/~vericgar/doc/apache-package-refresh.html.
Wouldn't it be simpler to just add a no-htdocs USE flag for Apache and not install the manual in the first place? The method you're suggesting means I have to install another package, add it to package.use and then use a version of Apache which is hard masked.
You would actually want to add it to package.use before installing it. I put the use-flag in gentoo-webroot-default because in the future more then just apache will depend on gentoo-webroot-default for default files. And you don't have to install a version of Apache that is hard-masked - you can wait until it comes out of hard-mask, and if you have the line in your package.use then you won't have to worry about the upgrade at that time overwriting what you have in /var/www/localhost.