>> I tried prototyping this layout structure with multiple MPMs using sfw >> build environment. >> I modified sfw build scripts to build and install prefork, worker mpm >> binaries under usr/apache2/bin directory. > > Perhaps this is covered in another email but how does the administrator > select which mode to use?
Currently, user has to either modify the HTTPD var inside apachectl to point to httpd.worker binary or specify HTTD var inside envvars file. If the server is invoked directly, then the user has to choose between httpd and httpd.worker. >> I have used different configure options for prefork and worker. > > I noticed that this indeed was the case in the configure details but > what is the practical ramification of doing this? Are there some > generic features of Apache that are only enabled with one model but not > another? There are some differences in the .h files that are copied to usr/apache2/include directory. For e.g., ----------------------------------------------------------------------------------------------- --- httpd-worker//httpd-2.2.4/include/ap_config_auto.h Fri Aug 10 02:28:08 2007 +++ httpd-prefork//httpd-2.2.4/include/ap_config_auto.h Fri Aug 10 02:24:34 2007 @@ -2,7 +2,7 @@ /* include/ap_config_auto.h.in. Generated from configure.in by autoheader. */ /* Location of the source for the current MPM */ -#define APACHE_MPM_DIR "server/mpm/worker" +#define APACHE_MPM_DIR "server/mpm/prefork" /* SuExec root directory */ /* #undef AP_DOC_ROOT */ @@ -111,7 +111,7 @@ /* #undef HAVE_PRCTL */ /* Define to 1 if you have the `pthread_kill' function. */ -#define HAVE_PTHREAD_KILL 1 +/* #undef HAVE_PTHREAD_KILL */ /* Define to 1 if you have the <pwd.h> header file. */ #define HAVE_PWD_H 1 ----------------------------------------------------------------------------------------------- > Or is it just that specifying this again causes modules to be > rebuilt that apparently do not need to be regenerated? And how are you > determining that the modules actually are the same? I built both prefork and worker mpms with the same set of options and ran a diff to find out if the modules differed. All were identical. I tried running Apache test suite which tests the functionality of the server and its modules. I got similar results for both prefork and worker. >> (I have changed the directory name from "libexec" to "modules" which >> is more intuitive). > > Since this seems to be a gratuitous changes from the way we currently > have the directory structure in OpenSolaris, I would recommend against > it unless you're adhering to a more standard layout that other vendors > use. I agree that this does not follow the OpenSolaris convention. Stefan had once suggested about this and the main reasons for the change could be 1. On linux modules are installed under "modules" directory" 2. Apache uses the term "modules" to refer to these libraries. We can retain the existing name "libexec", if everyone feels that way. Thanks and Regards, Seema.
