Labels

Linux (46) network (13) troubleshoot (13) command (10) virtualization (10) ubuntu (9) Windows (8) cisco (7) security (7) router (6) Tools (5) software (5) vmware (5) ospf (3) eigrp (1) zimbra (1)

2010年6月15日

Tomcat5 + Apache on Centos

Install Tomcat5:
    The easy way is yum install tomcat5 tomcat5-webapps

Testing:
    netstat -ntlp  <-----------Check the default 8080 port is ready
    http://localhost:8080/   <------Test the url

If you don't wanna join tomcat to apache2 you can stop here.

Join Tomcat to Apache2
There are several ways to join tomcat to apache2
  • jk  (mod_jk)
  • http_proxy   (mod_proxy)
  • proxy_ajp    (mod_proxy_ajp)
Now I use the easiest way - ajp_proxy:
vi /etc/httpd/conf.d/proxy_ajp.conf
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass /tomcat/ ajp://localhost:8009/

Double check the proxy_ajp.conf have included in httpd.conf

restart httpd and test with url "http://localhost/tomcat/"

沒有留言:

張貼留言