# Build and install a distributed Apache module, say mod_foo.c, into its own DSO mod_foo.so:

* Build and install via configure (preferred):

$ ./configure --prefix=/path/to/install --enable-shared=foo
$ make install

* Build and install manually:

– Edit src/Configuration:
<< AddModule modules/xxxx/mod_foo.o >> SharedModule modules/xxxx/mod_foo.so
$ make
$ cp src/xxxx/mod_foo.so /path/to/install/libexec
- Edit /path/to/install/etc/httpd.conf
>> LoadModule foo_module /path/to/install/libexec/mod_foo.so

# Build and install a third-party Apache module, say mod_foo.c, into its own DSO mod_foo.so

* Build and install via configure (preferred):

$ ./configure --add-module=/path/to/3rdparty/mod_foo.c --enable-shared=foo
$ make install

* Build and install manually:

$ cp /path/to/3rdparty/mod_foo.c /path/to/apache-1.3/src/modules/extra/
- Edit src/Configuration:
>> SharedModule modules/extra/mod_foo.so
$ make
$ cp src/xxxx/mod_foo.so /path/to/install/libexec
- Edit /path/to/install/etc/httpd.conf
>> LoadModule foo_module /path/to/install/libexec/mod_foo.so

# 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