Mod_sed module is a software that integrates sed command into Apache. It provides the ability to manipulate files and text directly from within Apache web server.
To build this module, simply type "make" into the command line. However, due to ongoing work to enhance the module's portability, it may not yet be compatible with all systems. Any patches are gratefully received. To build this module, users require the apxs(8) tool, as the developer does not yet understand Apache's static configuration. Users can specify apxs(8) location in the Makefile or the command line.
If the system does not have an fgetln(3) call, a line in the Makefile must be uncommented. Once built, "make install" should install mod_sed.so to the data directory and add appropriate lines to allow the module to function correctly in httpd.conf.
Users will need a directory or file they wish to filter within Apache and a httpd.conf fragment that makes use of SetHandler to enable mod_sed. Additionally, users need to ensure the specified directory is visible from Apache. The SetHandler line enables files under that directory to pass through mod_sed. The SedExtendedRegex line specifies using Enhanced Regexes over basic ones if users do not know the difference between the two.
The SedProgram keyword can specify a whole sed program or a pathname to a file containing a sed program, with the latter typically being preferred. Mod_sed will determine a file's existence by name, and if no file is available, it compiles it as a program. The last command, SedPathMap, takes two arguments - a PATH_INFO and another SedProgram argument. This command is incredibly useful for serving up different versions of files.
Version 0.1: N/A