Tuesday, February 09, 2010

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/mods-enabled/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

4. Enable mod_jk configurations: Create a link in /etc/apache2/mods-enabled/jk.conf which points to /etc/apache2/mods-available/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 ajp13worker.list=ajp13

# Set properties for worker named ajp13 to use ajp13 protocol,# and run on port 8009worker.ajp13.type=ajp13worker.ajp13.host=localhostworker.ajp13.port=8009worker.ajp13.lbfactor=50worker.ajp13.cachesize=10worker.ajp13.cache_timeout=600worker.ajp13.socket_keepalive=1worker.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.

Very well explained. I am making a FAI installation with apache maybe it could be interesting for the community: http://fai-project.org/ some months ago it was completely unknown to me. It allows Fully Automated Installations of Debian and Ubuntu

Awesome job Rajeev! I have done this setup several times but never got a chance to document it this well; if anyone asks me about this setup, I generally point them to your (this) page... So today thought to drop in a word of thanks and appreciation for your blog.

Here is one way...In terminal, 1. sudo nautilus 2. navigate to the file you want to link, right click on that file and “Create Link”. This will place a link to your file exactly where you are. Now take the link (cut: CTRL+X) and paste (CTRL+V) it the folder you want it at.

In terminal, 3. exit.

WARNING: Do NOT make any other changes than this in nautilus unless you know what YOU are doing. It can cause a major headache!

About Me

I am a technology enthusiast with 9+ years of experience in software
development. I have worked on multiple platforms, technologies and
domains in my career. I love to read about
upcoming technologies and trends in various domains. Currently, I am
exploring the world of mobile and web apps and working on pet projects
around html5, no-sql and video streaming.