Pavnay

 
  • Increase font size
  • Default font size
  • Decrease font size
FrançaisEnglish

[Apache] Compile an optional module

Print
Apache

For whom like me who like compile their httpd server, there's always a moment when we said we had added a module during the compilation.
There's an example of an independant module compilation : the rewriting module :

 

First, uncompress the httpd server archive and go to modules sources folder, compile the wanted module sources, link the module and put it in the httpd directory :

cd /tmp/httpd-2.2.6/modules/mappers 
gcc -fPIC -DSHARED_MODULE -I/usr/locale/apache2  -I/usr/local/apache2/include/  -c mod_rewrite.c
ld -Bshareable -o mod_rewrite.so mod_rewrite.o 
cp mod_rewrite.o /usr/local/apache2/modules/.


Then modify the httpd.conf file to load the module :

LoadModule mod_rewrite modules/mod_rewrite.so

Of course, adding shared modules is less optimale than to put them in the httpd core during the first compilation but it's a way to fix situations and to load only modules we need. 

Note that's possible to fully compile again a httpd server while there's already a running instance on the same server.

A simple reboot is needed to have the new httpd core...

Comments
Add New
+/-
Write comment
Name:
Email:
 
Title:
 
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow:
 
Febbweiss  - Module Proxy   |2012-02-06 17:52:22
Pour compiler et installer le mod_proxy :
apxs -a -i -c mod_proxy.c
proxy_util.c
apxs -a -i -c mod_proxy_ajp.c proxy_util.c ajp_utils.c ajp_header.c
ajp_msg.c ajp_link.c
apxs -a -i -c mod_proxy_balancer.c proxy_util.c
apachectl
configtest
apachectl graceful

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Actualités


AddThis Social Bookmark Button