How to setup Apache httpd 2.2 with openssl and tomcat

Objective: Use the latest httpd 2.2.X and openssl, mod_jk(tomcat connector) to setup a web server with tomcat service.


Steps:
1. download the latest openssl and follow the document to compile and make install

2. use the following configure parameters for httpd
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most ssl rewrite deflate headers expires --with-ssl=/usr/local/ssl
make;make install

note: after that, you can comment out all unnecessary modules from httpd.conf.

3. follow document of mod_jk and use apxs to generate the module file then copy to apache modules directory

FAQ:
1.  when startup apache in chroot envirnment /chroot, got the following error in error.log
caught SIGTERM, shutting down
Digest: generating secret for digest authentication ...
no such file or directory: Digest: error generating secret: no such file or directory

note: you can just simply disable digest module auth_digest_module

2.  When startup httpd, got the following error:
syntax error on line xxx of /usr/local/apache2/conf/httpd.conf
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

Note: must enable module authz_host_module, in httpd 2.2.X, the module is replacing the old module mod_access which is required by order command in httpd.conf

3. How to know what configuration command I used before for compiling httpd
Find the config.nice file from httpd source directory.