- First of all get Apache HTTP server from apahce site http://httpd.apache.org and apache tomcat server from http://tomcat.apache.org
- Install both Apache and Tomcat servers on your system.
- Now get tomcat connector from http://tomcat.apache.org/download-connectors.cgi
- Now start extracting tomcat connectors file and installing it on bash shell:
- $gunzip tomcat-connecters-x.x.xx-src.tar.gz
- $tar -xvf tomcat-connecters-x.x.xx-src.tar
- $cd tomcat-connecters-x.x.xx-src/native
- $./configure --with-apxs=APACHE_PATH/bin/apxs
- $make (compiling the installation files)
- $make install (installing files)
- $cp apache 2.0/mod_jk.so APACHE_PATH/modules
- Now configuring Tomcat server:
- $vi TOMCAT_PATH/conf/server.xml
- In this file add
<Listener classname="org.apache.jk.config.ApacheConfig" modJk="APACHE_PATH/modules/mod_jk.so"/ >
in <engine name="Catalina" defaulthost="localhost">...<engine> block. - Restart tomcat server if it is running: $./TOMCAT_PATH/bin/shutdown.sh then $./TOMCAT_PATH/bin/startup.sh
- Now doing Tomcat configuration
- $vi TOMCAT_PATH/cont/auto/mod_jk.conf
- Copy appropriate JkMount files from
block to outside of it. eg JkMount /abc ajp13 - Now configuring Apache server
- Open apache configuration file $vi APACHE_PATH/conf/httpd.conf
- Add following line at the end of file: Include TOMCAT_PATH/conf/auto/mod_jk.conf
- Also add LoadModule jk_module modules/mod_jk.so in httpd.conf file.
- Restart Apache server: $/usr/sbin/apachectl restart
- And you have dont it!!!
Reference:
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
No comments:
Post a Comment