Juanra

Well-Known Member
Sep 22, 2001
777
0
316
Spain
Ok, in that case, this is what I'd do:

# cd apache_1.3.27
# config.layout --enable-module=headers --enable-shared=headers
# make
# make install

Then edit httpd.conf and add these lines in the correct places:

LoadModule headers_module libexec/mod_headers.so

AddModule mod_headers.c

If you already have mod_expires as a loaded module, then add each of those two lines below the corresponding lines for mod_expires, like this:

LoadModule expires_module libexec/mod_expires.so
LoadModule headers_module libexec/mod_headers.so
.
.
.
AddModule mod_expires.c
AddModule mod_headers.c

and restart Apache.

Someone please confirm.
 

sanket

Member
Dec 17, 2003
5
0
151
i found a simple way out

Hi
I was trying to add mod_headers to my apache but could not get any help here.
I did a lot of reasearcha and found a simple way which does not require recompiling apache.


$:cd /home/cpapachebuild/buildapache/apache_1.3.29/src/modules/standard
$: /usr/local/apache/bin/apxs -c mod_headers.c
$:/usr/local/apache/bin/apxs -i -a -n headers mod_headers.so

this will compile and add the header to the apache along with adding the lines to httpd.conf

check httpd.conf by running
httpd configtest
If everything is fine
restart httpd by giving the command
httpd restart
thats it! Now mod_headers will work with your apache.

Generic Approach to add modules
Generic Instructions
Build and install a third-party Apache module, say mod_foo.c, into its own DSO mod_foo.so outside of the Apache source tree:
Build and install via apxs: $ cd /path/to/3rdparty
$ apxs -c mod_foo.c
$ apxs -i -a -n foo mod_foo.so
 
Last edited: