Compiling New Modules for Apache

From Zanecorpwiki

Jump to: navigation, search

Apache comes with lots of useful modules that can be loaded and unloaded (always compile Apache with loadable module support and use loadable modules). The challenge is that the modules must in general be built for the specific Apache deployment and the only good time build them is in the initial compilation. (If you're using Apache from a package manager, this may or may not be an issue).

On development machines, this isn't an issue: just rebuild Apache and tell the install to include the modules you want. On production, blowing away the existing Apache is probably not an option.

The solution is to rebuild Apache on the same machine and copy the module (.so) files over. This may not be 100% foolproof as I've tested and noticed that a module file build in this manner can differ from what the file would have been. Also, I may be missing some tool or other procedure as it seems that needing a new module would be fairly common and I'd expect a better way to do it.

On a ymake install, just change the build directory to something else (like build2), update install.sh and away you go. Do not update the yusers. Ymake will happily use the existing yusers. (If this is accidentally done, it can be cleaned up by resetting the UID in /etc/passwd to the original UID, copying the new user home dir to the original location, and fixing ownership).

Personal tools