Syntax: MMapFile filename ...
Default: None
Context: server-config
Override: Not applicable
Status: Experimental
Module: mod_mmap_static
Compatibility: Only available in Apache 1.3 or
later
The MMapFile
directive maps one or more files
(given as whitespace separated arguments) into memory at server
startup time. They are automatically unmapped on a server shutdown.
When the files have changed on the filesystem at least a HUP or
USR1 signal should be send to the server to re-mmap them.
Be careful with the filename arguments: They have to
literally match the filesystem path Apache's URL-to-filename
translation handlers create. We cannot compare inodes or other
stuff to match paths through symbolic links etc. because
that again would cost extra stat()
system calls which
is not acceptable. This module may or may not work with filenames
rewritten by mod_alias
or mod_rewrite
...
it is an experiment after all.
Notice: You cannot use this for speeding up CGI programs or other files which are served by special content handlers. It can only be used for regular files which are usually served by the Apache core content handler.
Example:MMapFile /usr/local/apache/htdocs/index.html
Note: don't bother asking for a for a
MMapDir
directive which recursively maps all the files in a
directory. Use Unix the way it was meant to be used. For example,
see the Include directive, and
consider this command:
find /www/htdocs -type f -print \\\\ | sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf