This example is for a module called mod_speling that is actually included in the "Apache distribution" but normally to enable it, you must recompile apache.

It shows how to find the source code for just one module and then install it without having to recompile apache.

This is for apache 1.3.34 and cPanel 10.8, you will have to change the directories here to fit your particular version and possibly look for your module's source file in the source directory:

You must do the "Apache Update" via WHM first, it will take a while to complete but will leave the updated apache source code version in the below directory, that's what we want.

The module's source code was in:

/home/cpapachebuild/buildapache/apache_1.3.34/src/modules/standard/

So now we use apxs to compile it and put it where we want (this is one long line):

/usr/local/apache/bin/apxs -c /home/cpapachebuild/buildapache/apache_1.3.34/src/modules/standard/mod_speling.c -o /usr/local/apache/libexec/mod_speling.so

What that does is compile just the module source code and then places the compiled output in the "libexec" directory so apache can find it when it starts up.

Now edit your httpd.conf file, you must add these lines to the end of their respective sections (where other things like this are listed):

pico -w /etc/httpd/conf/httpd.conf

(and add in)

LoadModule speling_module libexec/mod_speling.so

AddModule mod_speling.c

(save it then use the command below to check the conf file)

httpd configtest

If that all works then you can try a httpd restart.

All that and no recompiling of apache! This is a interesting module, now you can type PiCtUrEs.html even though the actual file is pictures.html and it will still find the file.

Don't forget to add "CheckSpelling On" into your .htaccess file in each site you want this to work in.

This example should work for other modules, I only tested it so far with this one module.