The best part about Apache is that you can custom build it to include exactly what you need. The defaultconfiguration is a good one, but its far-too-general nature is, by definition, not the best choice for the majority of installations. With a host of plug-in modules available for free over the Internet, customizing Apache to its fullest extent is not only fast and easy, but well worth the time spent.
Using --with-layout you can easily indicate where should Apache go after it's compiled. Locations for binaries, man pages, configuration files, and the like can be set using specific options to the configure script, or they can be defined all at once in a layout. Layouts are defined in the config.layout file, in the root of the Apache source. There are several layouts prefined, including Mac OS X server, BeOS, a typical GNU layout, and others. We'll use the layout named Apache as an example, since it's the default; if a layout is not specified, configure uses the Apache layout as a base, and any command l ine options overrride individual directives. (The comments on the right hand side of this table indicate the command line options that can be used for overrides.)
These sections define where the various pieces of the final
package will go. The whole thing will based in /usr/local/apache, with all binaries (httpd and the support programs) in /usr/local/apache/bin, man pages based in /usr/local/apache/man, configuration files in /usr/local/apache/conf, and so on. Changes to the layout can be made to one of the existing <Layout> sections, or a new one can be added by copying and pasting.
Here is the layout similar to the one that I generally use:
This is very similar to the Apache layout, except for a few
things: man pages go into /usr/local/man, so they can be easily retrieved with a regular call to 'man httpd'; include files go into /usr/include/apache, so that they can be more easily used when I write to the Apache API, and configuration files go into /etc/apache. Logs, proxy stuff, and things like PID files go into /var/apache; I mount a separate partition as /var so my root filesystem doesn't fill up with logs, which makes it an ideal place for webserver logs.