Add a module to apache using apxs

To add mod_rewrite.c using apxs. Assuming the apache source file is located at /usr/src/apache/httpd-2.2.14

cd /usr/src/apache/httpd-2.2.14/modules/mappers/

/usr/local/apache/bin/apxs -i -a -c mod_rewrite.c

You will get the message module has been added. Restart apache.