Apache under Windows Page 5
Because of the different ways that things are handled on Unix and NT, there are some configuration directives that are specific to NT, there are some other directives that don't mean anything on NT, and there are some directives for which the recommended values are different on NT, for whatever reason.
- AccessConfig and ResourceConfig
In recent versions of Apache, the old 3-file configuration system has
given way to just having one configuration file. There are files called
srm.conf and access.conf, but they contain just comments. However,
Apache still opens them up when the server starts, and looks for
directives. You can tell Apache not to do this, by setting the
AccessConfig and ResourceConfig directives to point at /dev/null on
Unix. The equivalent of this on Windows is nul. Every directory
contains an imaginary file called nul which acts like /dev/null - that
is, it's just a bitbucket.
AccessConfig nul ResourceConfig nul
nulcan also be used for directives like AuthGroupFile, and anywhere else that you might use /dev/null on Unix
The default value for this directive on Unix is ".htaccess". NT does not
care much for filenames that start with a period (.), so the recommended value
for this on NT is "htaccess". You can get away with using .htaccess if
you like, but you might find that some editors will have trouble
reading these files, and you might have difficulty actually naming a
file that. When I tried to rename a textfile to .htaccess in Windows
Explorer, I got a dialog box that said ''You must type a filename.''
Not really a difference here, just a comment. On Unix systems, the
LoadModule directive allows you to load a module from an object file.
The equivalent of a shared object (so) on Unix, is a dll file on
Windows, and so these directives will look a little different on
Windows, but do exactly the same thing.
LoadModule status_module modules/mod_status.so
LoadModule status_module modules/ApacheModuleStatus.dll
What the directive means is how many requests a child should serve
before that child exits. However, since on Windows, there is only one
child, and it stays active for the length of the Apache process, it
would be silly to have the process exit after any number of requests.
The default configuration file that ships with Apache for NT has this set to 0, which means never exit. You should leave it at that value.
If you do happen to set it to something other than 0, you may get some unexpected behavior. In particular, due to the way that the parent/child relationship works on Win32, and the fact that there's no real ''fork'' on Win32, when the child does exit, it has to completely respawn. This means that it re-reads the configuration files. You might find that changes to the config files get applied before you restart the server, because the server effectively restarted itself.
You'll also get a brief service outage as the server restarts, rereads the configuration files, and gets going again.
- MaxSpareServers, MinSpareServers
These directives refer to the number of child processes that should be
left lying around idle before they are killed. This is of course
meaningless on Windows, and so these directives have no effect on