<p>On Mac OS X 10.5 I downloaded the latest version of Apache 2.2.9. After the usual configure, make, make install dance I had a build of apache without mod_rewrite. This wasn't statically linked and the module was not built in the /modules folder either.</p>

<p>I had to do the following to build Apache and mod_rewrite:</p>

<pre><code>./configure --prefix=/usr/local/apache2 --enable-rewrite=shared
</code></pre>

<ul>
<li>Is there a way to tell Apache to build all modules as Shared Modules (DSOs) so I can control loading from the Apache config?</li>
<li>Now that I have built Apache and the mod_rewrite DSO, how can I build another shared module without building all of Apache?</li>
</ul>

<p>(The last time I built Apache (2.2.8) on Solaris, by default it built everything as a shared module.)</p>

Try the
```
./configure
```
option
```
--enable-mods-shared="all"
```
, or
```
--enable-mods-shared="<list of modules>"
```
to compile modules as shared objects. See further
details in Apache 2.2 docs
To just compile Apache with the ability to load shared objects (and add modules later), use
```
--enable-so
```
, then consult the documentation on compiling modules seperately in the
Apache 2.2. DSO docs
.