HowTo: Load Additional Apache Modules Provided By Zend

Follow

Applies to:
Zend Server 8.5
Mac OS X

Summary

This KB shows how to load additional Apache modules the Apache server installed by Zend Server, when those modules are already provided.

Note:
This does not cover any additional Apache modules which are not provided by Zend - you may need to look for a similar Apache version compiled for your OS X, copy the missing modules and try to load them. This is not supported in any way, and you should first unload any such module before reporting an issue to Zend Global Support.

Solution

This shows how to add 3 common modules to the Apache conf. The recipe is very basic with some hints in CAPITALS.

FIRST, REVIEW OF LOADED MODULES:

$ sudo /usr/local/zend/apache2/bin/apachectl -M | xargs
Syntax OK
Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) include_module (static) filter_module (static) log_config_module (static) env_module (static) setenvif_module (static) ssl_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) rewrite_module (static) so_module (static) php5_module (shared)

NOW, WE NEED TO CHECK WHICH MODULES ARE ALREADY PROVIDED SO WE CAN LOAD THEM:

$ sudo ls -la /usr/local/zend/apache2/modules/
httpd.exp              mod_authz_svn.so       mod_dav_lock.so        mod_headers.so         mod_proxy.so           mod_proxy_connect.so   mod_proxy_scgi.so
libphp5.so             mod_dav.so             mod_deflate.so         mod_info.so            mod_proxy_ajp.so       mod_proxy_ftp.so       mod_version.so
mod_auth_digest.so     mod_dav_fs.so          mod_expires.so         mod_mime_magic.so      mod_proxy_balancer.so  mod_proxy_http.so      mod_vhost_alias.so

BACKUP, BACKUP, BACKUP:

$ sudo cp /usr/local/zend/apache2/conf/httpd.conf{,-orig}

THESE ARE ONLY LOADING DIRECTIVES. FOR ANY REAL WORLD DIRECTIVES, YOU WILL NEED TO CHECK ACTUAL APACHE CONFIGURATION, CONSULT THE APACHE REFERENCE PAGES FOR EACH SPECIFIC MODULE'S CONFIGURATION AND DEPENDENCIES.

NOTE: LOAD MODULE DIRECTIVES SHOULD BE PLACED WITHIN THE APPROPRIATE SECTION, SO EDITING THE APACHE CONF MANUALLY IS A MORE THOUGHT SOLUTION. FOR THIS RECIPE - WE WILL ADD THE MODULE LOADING AT THE END OF THE MAIN CONF. YOU CAN ALSO CREATE AN INCLUDED CONF FOR ALL EXTRA MODULES AND THEIR CONFIGURATION, PLACE IT UNDER /EXTRA AND INCLUDE IN THE MAIN APACHE CONF.

$ sudo echo "LoadModule dav_module /usr/local/zend/apache2/modules/mod_dav.so" >> /usr/local/zend/apache2/conf/httpd.conf
$ sudo echo "LoadModule dav_lock_module /usr/local/zend/apache2/modules/mod_dav_lock.so" >> /usr/local/zend/apache2/conf/httpd.conf
$ sudo echo "LoadModule vhost_alias_module /usr/local/zend/apache2/modules/mod_vhost_alias.so" >> /usr/local/zend/apache2/conf/httpd.conf

CHECK SYNTAX FOR OUR INSERTED CHANGES:

$ sudo /usr/local/zend/apache2/bin/apachectl -t
Syntax OK

IF THERE IS ANY OTHER RESULT - FIX APACHE CONFIG BEFORE RESTARTING, OR IT WILL NOT START!

$ sudo /usr/local/zend/bin/zendctl.sh restart-apache

NOW, WE NEED TO VERIFY THAT EVERYTHING IS LOADED. IF THERE IS ANY PROBLEM - CHECK APACHE ERROR LOG AND SEE WHY IT FAILS TO LOAD SOMETHING.

$ sudo /usr/local/zend/apache2/bin/apachectl -M | xargs
Syntax OK
Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) include_module (static) filter_module (static) log_config_module (static) env_module (static) setenvif_module (static) ssl_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) rewrite_module (static) so_module (static) php5_module (shared) dav_module (shared) dav_lock_module (shared) vhost_alias_module (shared)

As you can see, last 3 modules are added to Apache.

Comments