Skip to content

Instantly share code, notes, and snippets.

@arunssasidhar
Last active December 24, 2015 19:39
Show Gist options
  • Save arunssasidhar/6851872 to your computer and use it in GitHub Desktop.
Save arunssasidhar/6851872 to your computer and use it in GitHub Desktop.
Installing a Apache module, without re-compiling the entire web server is easy with Apache extension tool (apxs). For that you need the source code you have used for compiling the Apache server. Here I will show you show you how to add Mod_Rewrite in Apache server.
Go to your Apache source directory where your module source codes are stored. Here you can see many files with .c extension.
# cd httpd-VERSION/modules/mappers
# apxs -i -a -c mod_rewrite.c
Where
c = Compile the source code
i = Copy the compiled module (.so) file to the Apache module directory.
a = Activates the module is Apache, by adding required directives in httpd.conf.
Activate the newly added module by restarting Apache after checking the Apache config.
# apachectl configtest
Syntax OK
# apachectl graceful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment