Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache - how do I build individual and/or all modules as shared modules

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.

I had to do the following to build Apache and mod_rewrite:

./configure --prefix=/usr/local/apache2 --enable-rewrite=shared
  • Is there a way to tell Apache to build all modules as Shared Modules (DSOs) so I can control loading from the Apache config?
  • Now that I have built Apache and the mod_rewrite DSO, how can I build another shared module without building all of Apache?

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

like image 413
Brian Lyttle Avatar asked Aug 31 '08 20:08

Brian Lyttle


2 Answers

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.

like image 53
Brendan Avatar answered Oct 01 '22 03:10

Brendan


./configure --prefix=/usr/local/apache2 --enable-mods-shared="all" --enable-proxy=shared

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 v2.2.22 "all" did not include the proxy module.

like image 23
so_mv Avatar answered Oct 01 '22 03:10

so_mv