Ubuntu 8.10 Apache mod_ajp to TomCat6

So I had this project where we needed to have the Tomcat handle the JSP pages from a website. I had to install a few mod to apache and then setup the ProxyPass to handle the requests. Now I may have enabled too many mods so you can activate them one at a time until you get it working. Here are the mods I added to Ubuntu 8.10 standard install:

proxy_ajp.load, proxy_balancer, proxy_connect.load, proxy_http.load, proxy.load

AGAIN, I may have activated too many but I will need some of them for things like ruby later. I did not alter any of the information in these files.

Here is the site config I added to the virtual host file:
<IfModule mod_proxy.c>
     ProxyPass /DIRECTORY ajp://localhost:8009/DIRECTORY
</IfModule>
Where the directory pass through is the same as /webapps/DIRECTORY on Tomcat6

Next we had to make some changed to some of the files which might not apply to your application:
nano etc/tomcat6/policy.d/04webapps.policy
In that file we had to make some changes to the read and write:
permission java.io.FilePermission "/FOLDER/APPLICATION/sessions/*", "read, write";
Note that we put in the application in the home folder of a user and then did an "ln -s" into the TomCat6 webapps folder so that the user could change the files for the application. It needed to write session information to a folder and have permissions.

I hope this helps anyone trying to get things going.

Comments

Popular posts from this blog

Console over SSH (ONTAP)

Brocade Zone Setup

OpenSolaris ZFS Setup