You are not logged in Log in Join
You are here: Home » Members » ike » Apache Install Notes » Apache 2.0 on Mac OSX Server to proxy Zope » configure_html

Log in



2 configure

this is the tricky part.
Your Apache can be configured with a ton of compile-time directives which compile as mod_whatever. Apache veterans should be really comfortable with this.

I am going to configure in a way which meets my objectives for a production OSX server:

Choosing an MPM (multi-processing-module)

Apache 2 has several options for dealing with processes, to encompass different needs and different platforms. These are the MPM modules. There is more info about all the options at the Apache site, and I will briefly discuss three which are applicable for use with OSX:


This is functionally equivalent to how everything worked in Apache 1.x era. A parent server process is started, and child processes are spawned from it. The server keeps a few spawned children running, to handle incoming requests- and the server can kill child processes if too many are started- keeping the server from crashing. THIS IS WHY WE ALL LOVE APACHE.
The benefit of using this module is that it is a single-process model, and lots of older Apache modules will work well with it- and be quite stable.
The downside of this module is that many systems take a performance hit as new child processes are spawned as one process is handled at a time.


This is what I'll use here-
The worker module is much like the PREFORK module, but is a hybrid thread/process MPM. This means that it behaves like the PREFORK by spawning children, and these children spawn a static number of threads. The worker then has one thread per child listening to the network, and each process can serve many processes at once.
The benifits are sweet on OSX, seeing as the PPC is built to thrive on multithreading. Speed, Stability, and Scalability are the key benefits here.
The downside of this model is that writing modules which are stable for multithreading is more complex, and developers are slower to adopt this. If you are running experimental/3rd party modules, you'd be better off running PREFORK.

This one is really creepy. Perchild is like WORKER mpm, but each child process, (running multiple threads), is run as a seperate user process. Additionally, the child processes can run dynamic numbers of threads. This means that security for CGI's can be extremely watertight. Now, if you want to be running this module, it's a bit outside of the scope of this How-To, and I'd hit the Apache website for more info: If you see any really great uses of this module with Zope, PLEASE email me! <>


Included here is a quick expination of how the Windows MPM works. Essentially, windows users only have one option for Apache MPM's. The MPM is designed to take the best advantage of WindowsNT architecture, and one child process runs a static number of threads. It is designed using some windows-specific stuff called AcceptEx, which helps to reduce the potency of DOS attaacks. More information about windows and Apache can be found here:

But, since this how-to is for MAC OSX, I'll move on.


Next, Modules!
Apache has a staggering array of modules for all sorts of uses. You can check out what you want for yourself by typing:

% ./configure --help

But I'll go over a few that I think are usefull to a Zope Developer:


--enable-mod-proxy, and,
--enable-proxy-connect- are necessary for Zope proxying.
--enable-proxy-ftp *new!* - great for using Zope as a virtual host, could be used to set up name-based ftp services to proxied Zope directories.


--enable-file-cache is a very simple way to greatly improve the performance of Apache, by caching the Apache config files etc...

disk-cache, mem-cache, and straight cache DON'T SEEM TO COMPILE. But really, if your doing any hardcore caching (aside from inside Zope), might as well DROP Apache alltogether, in favor of a Squid-cache <g>.