Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

11/1/13

Configure mod_jk with Apache 2.2 in Ubuntu | TechNIX

TechNIX
ENT ER INTO T EC H W OR LD

Home Scripting

News

How Tos

Hacks

Knowledge Base

Aug

15

Configure mod_jk with Apache 2.2 in Ubuntu


1. Install mod_jk: To install mod_jk in ubuntu execute the following command on the command line. sudo apt-get install libapache2-mod-jk 2. Enable mod_jk loading: Create a link in /etc/apache2/modsenabled/jk.load which points to /etc/apache2/mods-available/jk.load. This will enable loading mod_jk module in apache when apache is restarted. 3. Create mod_jk conf file: Create a mod_jk conf file and place it in /etc/apache2/mods-available/jk.conf # Where to find workers.properties # Update this path to match your conf directory location JkWorkersFile /etc/apache2/jk_workers.properties# Where to put jk logs # Update this path to match your logs directory location JkLogFile /var/log/apache2/mod_jk.log# Set the jk log level [debug/error/info] JkLogLevel info# Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat ForwardDirectories

www.technix.net.in/configure-mod_jk-with-apache-2-2-in-ubuntu/

1/4

11/1/13

Configure mod_jk with Apache 2.2 in Ubuntu | TechNIX

# JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T # Shm log file JkShmFile /var/log/apache2/jk-runtime-status 4. Enable mod_jk configurations: Create a link in /etc/apache2/modsenabled/jk.conf which points to /etc/apache2/modsavailable/jk.conf . This will enable mod_jk configuration in apache when apache is restarted. 5. Create a worker properties file: Create a workers properties file and place it in /etc/apache2/jk_workers.properties # Define 1 real worker named ajp13 worker.list=ajp13# Set properties for worker named ajp13 to use ajp13 protocol, # and run on port 8009 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.lbfactor=50 worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300 6. Configure url forwarding in apache to tomcat: Put the following lines in you apache virtualhost to forward requests to tomcat. <VirtualHost *:80> # Send everything for context /context to worker ajp13 JkMount / ajp13 JkMount /* ajp13 </VirtualHost> 7. Configure AJP in tomcat server. Put the following line in $TOMCAT_HOME/conf/server.xml file under the Servies tag. <Service name=Catalina> <! Define an AJP 1.3 Connector on port 8009 > <Connector port=8009 protocol=AJP/1.3 redirectPort=8443 />
www.technix.net.in/configure-mod_jk-with-apache-2-2-in-ubuntu/ 2/4

11/1/13

Configure mod_jk with Apache 2.2 in Ubuntu | TechNIX

</Service> 8. Restart the tomcat and apache server: Relax you are done.

Posted in How Tos

Leave a Reply
Your email address will not be published. Required fields are marked * Name * Email * Website

You may use these HTML tags and attributes: < ah r e f = " "t i t l e = " " >< a b b rt i t l e = " " >
< a c r o n y mt i t l e = " " >< b >< b l o c k q u o t ec i t e = " " >< c i t e >< c o d e >< d e ld a t e t i m e = " " >< e m >< i >< qc i t e = " " > < s t r i k e >< s t r o n g >

Post Comment

Installing Tomcat 7

Microsoft to roll out Windows 8.1 update on August 17

Search
A RC HI VES

Search

November 2013 M T W T F S S
3/4

www.technix.net.in/configure-mod_jk-with-apache-2-2-in-ubuntu/

11/1/13

Configure mod_jk with Apache 2.2 in Ubuntu | TechNIX

1 4 11 18 25 Sep 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29

2 9 16 23 30

3 10 17 24

R EC ENT PO S TS

Linus Torvalds Talks Linux Development Linux Kernel 3.11 Released Why nosql? Windows 8 vulnerable to hacking Dell launches Alienware laptops starting at Rs 1.14 lakh HP Tegra 4 tablet leaked in benchmark Intel Core i7 4960X comes in Q3 13 ID@Xbox is the new Self-Publishing program No reward for hacking Zuckerbergs Facebook page Nagios and Zabbix Monitoring Systems

Proudly powered by WordPress | Theme: Reddle by Automattic.

www.technix.net.in/configure-mod_jk-with-apache-2-2-in-ubuntu/

4/4

You might also like