One of the problems I find while setting up a Red Hat web server is that it is hard to build a server while respecting the environment the packages sets up for you. For example, I want to put all my web server files under /var/www and keep them under CVS control. Now go in, remove apache-manual, upgrade to a new Red Hat version and see what is left of your web site. I think that the whole server should be under a single directory, and that the /etc/rc.d/init.d/httpd script should look at a configuration file (like /etc/sysconfig/httpd) to know where to boot up. The configuration normally included by the Red Hat packages could be put in a separate package (all under /var/www/redhat for example). The /etc/sysconfig/httpd file could have variables for a number of options beside SERVER_ROOT. This is just a single idea to resolve that problem, the point being that I would like to be able to upgrade Red Hat systems and put up a copy of my web server on another machine quickly and easily (get the /var/www/myserver directory, change the sysconfig file and off we go!).
Created attachment 4168 [details] Improved configurability of Apache
That patch let you install an Apache server root somewhere and start it up, without affecting the basic installation. I know, I could make /etc/httpd/conf/httpd.conf a link to my configuration, which could have a ServerRoot in it, but here are two advantages to my way: - the packaged configuration file is left untouched (ok, a backup is easy) - my server root stays position-independent For example, I run my web site on multiple machines, some Red Hat 6.2, some Red Hat 7.0, and one of them, I run from within my user home directory (it is my test server).
Something very similar to this (/etc/sysconfig/apache) is being added to the apache-1.3.14-7 package. Thanks!
Nice, thank you! Working more on this, I found other places where my configuration "rubs" with the Red Hat one. I digged out some more, and found out that since Apache 1.3.13, if you "Include" a directory in the httpd.conf file, Apache will read every files in there in a recursive manner. Following this, you could have a /etc/httpd/conf.d in a manner similar to /etc/xinetd.d, and put more specific configuration in there. There would need to split the current httpd.conf file in two parts, one that is generic and is to be leveraged by just about any configurations (setting up LockFile, PidFile, User, modules, MIME types and so on) should be kept in httpd.conf, and more site-specific configuration (mostly all <Directory> and <Location> directives, virtual hosts, e-mail addresses and binding for example (maybe others)) should be kept in a file in /etc/httpd/conf.d I would suggest actually putting the default Red Hat setup in something like /etc/httpd/conf/default.conf which would then be symlinked from /etc/httpd/conf.d (in a manner similar to the init.d directory vs. the rcX.d directories). The directives in httpd.conf would be overridable in a site-specific configuration file, since they would be pulled in afterward. Since I wouldn't meddle with the RPM-packaged files, they would upgrade nicely and clealy. If I wanted to disable Red Hat's configuration completely, I would simply remove the symlink in /etc/httpd/conf.d and everything would be gone. I will work on this a bit and propose a patch.
Created attachment 9140 [details] Patch separating httpd.conf into a generic config and a site-specific config
The previous patch separates httpd.conf into two files. You should also create a /etc/httpd/conf.d directory, and optionally make a symlink in that directory pointing to the new /etc/httpd/conf/default.conf file (this will result in having the same configuration as out-of-the-box). A question: does this has any chance of getting into Red Hat Linux 7.1 (if accepted, of course!)?
Not at this time. We're in bug-fix mode for the next release, and I'd rather not churn the web server configuration files (I'd have to touch all of the module packages, too) at this stage. Marking as deferred, because we will be going there, probably for the next release after the one which Fisher is the beta for. Thanks!