Build Apache with static modules

How can I build Apache v2.2 with static modules?

I'm using the ports system and not compiling via command line.

The only info I can find is "--enable-module=static" - but I'm not sure how that would translate in to the make.conf file.

Also, I'm assuming after Apache has been compiled with the modules statically, I need to comments out the module reference lines in the httpd.conf file?

Any assistance would be appreciated.
 
Take a look at Makefile.doc of the port.

It can be done, by hand, eg:
Code:
make install \
    WITHOUT_APACHE_OPTIONS=yes \
    WITH_MODULES="authz_host actions alias cgi charset_lite deflate dir env expires headers log_config logio mime mime_magic negotiation setenvif unique_id vhost_alias filter ssl rewrite userdir" \
    WITH_STATIC_MODULES="authz_host actions alias cgi charset_lite deflate dir env expires headers log_config logio mime mime_magic negotiation setenvif unique_id vhost_alias filter"
 
If I were to add this to my make.conf file, would this be the correct syntax?

Code:
.if ${.CURDIR}=="/usr/ports/www/apache22"
WITHOUT_APACHE_OPTIONS=yes
WITH_MODULES=auth_basic authn_file authz_host authz_user alias deflate dir env expires headers log_config logio mime rewrite setenvif
WITH_STATIC_MODULES=auth_basic authn_file authz_host authz_user alias deflate dir env expires headers log_config logio mime rewrite setenvif
.endif

Also, is it possible to build these in statically as well?

Code:
LoadModule rpaf_module libexec/apache22/mod_rpaf2.so
LoadModule php5_module libexec/apache22/libphp5.so

I'm assuming I would just need to add "rpaf php5" to the modules list?
 
My apologies, I am wrong:
  • WITHOUT_APACHE_OPTIONS does not exist anymore. It was an option to skip the make config step.
  • Despite WITH_MODULES, it seems that some additionnal modules are added. You have not full control of the build as earlier.

Mayhem30 said:
Also, is it possible to build these in statically as well?
As far I know, not with (standard) ports. And it sould be quite unmanageable, I guess.
 
Back
Top