<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>

[{'answer_id': 37111, 'author': 'Brendan', 'author_id': 199, 'author_profile': 'https://Stackoverflow.com/users/199', 'pm_score': 5, 'selected': True, 'text': '<p>Try the <code>./configure</code> option <code>--enable-mods-shared="all"</code>, or  <code>--enable-mods-shared="&lt;list of modules&gt;"</code> to compile modules as shared objects. See further <a href="http://httpd.apache.org/docs/2.2/programs/configure.html#otheroptfeat" rel="noreferrer">details in Apache 2.2 docs</a></p>\n\n<p>To just compile Apache with the ability to load shared objects (and add modules later), use <code>--enable-so</code>, then consult the documentation on compiling modules seperately in the <a href="http://httpd.apache.org/docs/2.2/dso.html" rel="noreferrer">Apache 2.2. DSO docs</a>.</p>\n'}, {'answer_id': 9094896, 'author': 'so_mv', 'author_id': 186858, 'author_profile': 'https://Stackoverflow.com/users/186858', 'pm_score': 1, 'selected': False, 'text': '<pre><code>./configure --prefix=/usr/local/apache2 --enable-mods-shared="all" --enable-proxy=shared\n</code></pre>\n\n<p>To get rewrite, proxy and bunch of other modules, I used the above command. In my previous installation, using --enable-mods-shared="all" compiled/installed the proxy module as well. But in <code>v2.2.22</code>  "all" did not include the proxy module.</p>\n'}]
['https://Stackoverflow.com/questions/37069', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/636/']