# the order below without expert advice.
#
# Example:
-# LoadModule foo_module libexec/mod_foo.so
+# LoadModule foo_module modules/mod_foo.so
### Section 2: 'Main' server configuration
#
$ apxs -i -a -c mod_foo.c
gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c
ld -Bshareable -o mod_foo.so mod_foo.o
- cp mod_foo.so /path/to/apache/libexec/mod_foo.so
- chmod 755 /path/to/apache/libexec/mod_foo.so
+ cp mod_foo.so /path/to/apache/modules/mod_foo.so
+ chmod 755 /path/to/apache/modules/mod_foo.so
[activating module `foo' in /path/to/apache/etc/httpd.conf]
$ apachectl restart
/path/to/apache/sbin/apachectl restart: httpd not running, trying to start
This indicates the installation operation and installs one or more
dynamically shared objects into the
server's
-.I libexec
+.I modules
directory.
.TP 12
.B \-a
step
.B apxs
provides an automatic way to install the shared object in its
-"libexec" directory and updating the
+"modules" directory and updating the
.B httpd.conf
file accordingly. This can be achieved by running:
.nf
$ apxs -i -a mod_foo.c
- cp mod_foo.so /path/to/apache/libexec/mod_foo.so
- chmod 755 /path/to/apache/libexec/mod_foo.so
+ cp mod_foo.so /path/to/apache/modules/mod_foo.so
+ chmod 755 /path/to/apache/modules/mod_foo.so
[activating module `foo' in /path/to/apache/etc/httpd.conf]
$ _
.fi
This way a line named
.nf
- LoadModule foo_module libexec/mod_foo.so
+ LoadModule foo_module modules/mod_foo.so
.fi
is added to the configuration file if still not present.
gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c
ld -Bshareable -o mod_foo.so mod_foo.o
apxs -i -a -n "foo" mod_foo.so
- cp mod_foo.so /path/to/apache/libexec/mod_foo.so
- chmod 755 /path/to/apache/libexec/mod_foo.so
+ cp mod_foo.so /path/to/apache/modules/mod_foo.so
+ chmod 755 /path/to/apache/modules/mod_foo.so
[activating module `foo' in /path/to/apache/etc/httpd.conf]
apachectl restart
/path/to/apache/sbin/apachectl restart: httpd not running, trying to start
<< Rule SHARED_CORE=default
>> Rule SHARED_CORE=yes
<< EXTRA_CFLAGS=
- >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/libexec\"
+ >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/modules\"
$ make
-$ cp src/libhttpd.so* /path/to/install/libexec/
-$ cp src/libhttpd.ep /path/to/install/libexec/
+$ cp src/libhttpd.so* /path/to/install/modules/
+$ cp src/libhttpd.ep /path/to/install/modules/
$ cp src/httpd /path/to/install/bin/
</PRE>
</TD></TR></TABLE>
<< AddModule modules/xxxx/mod_foo.o
>> SharedModule modules/xxxx/mod_foo.so
$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
+$ cp src/xxxx/mod_foo.so /path/to/install/modules
- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
+ >> LoadModule foo_module /path/to/install/modules/mod_foo.so
</PRE>
</TD></TR></TABLE>
</UL>
- Edit src/Configuration:
>> SharedModule modules/extra/mod_foo.so
$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
+$ cp src/xxxx/mod_foo.so /path/to/install/modules
- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
+ >> LoadModule foo_module /path/to/install/modules/mod_foo.so
</PRE>
</TD></TR></TABLE>
</UL>
<< Rule SHARED_CORE=default
>> Rule SHARED_CORE=yes
<< EXTRA_CFLAGS=
- >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/libexec\"
+ >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/modules\"
$ make
-$ cp src/libhttpd.so* /path/to/install/libexec/
-$ cp src/libhttpd.ep /path/to/install/libexec/
+$ cp src/libhttpd.so* /path/to/install/modules/
+$ cp src/libhttpd.ep /path/to/install/modules/
$ cp src/httpd /path/to/install/bin/
</PRE>
</TD></TR></TABLE>
<< AddModule modules/xxxx/mod_foo.o
>> SharedModule modules/xxxx/mod_foo.so
$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
+$ cp src/xxxx/mod_foo.so /path/to/install/modules
- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
+ >> LoadModule foo_module /path/to/install/modules/mod_foo.so
</PRE>
</TD></TR></TABLE>
</UL>
- Edit src/Configuration:
>> SharedModule modules/extra/mod_foo.so
$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
+$ cp src/xxxx/mod_foo.so /path/to/install/modules
- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
+ >> LoadModule foo_module /path/to/install/modules/mod_foo.so
</PRE>
</TD></TR></TABLE>
</UL>
# httpd.conf
<IfDefine ReverseProxy>
- LoadModule rewrite_module libexec/mod_rewrite.so
- LoadModule proxy_module libexec/libproxy.so
+ LoadModule rewrite_module modules/mod_rewrite.so
+ LoadModule proxy_module modules/libproxy.so
</IfDefine>
</PRE>
libhttpd.dll shared library is compiled. You may also have to change
the compiler settings to ensure that the Apache header files are
correctly located. You can find this library in your server root's
- libexec directory. It is best to grab an existing module .dsp file
+ modules directory. It is best to grab an existing module .dsp file
from the tree to assure the build environment is configured correctly,
or alternately compare the compiler and link options to your .dsp.</P>