FC5系统默认安装的apache和tomcat整合

FC5系统默认安装的apache和tomcat整合

兄弟们,你们好,今天来在里想和大家讨论一个很棘手的问题,我相信这很多的兄弟也遇见过这样的问题,
想在这里来和大家讨论和分享。
  
      我的问题是:怎样用FC5自带的apache和tomcat整合?
1.用系统自带的apache和tomcat整合的必要性:系统安装的apache有很多的优点,在系统默认安装的apache下有运行php的模块、mysql相关的模块等等,我们不需要重新去编译和安装,还有就是可管理性强,我系统默认安装的apache是2.2.2版本的,tomcat是5.5.15版本的,目前忙活了好长时间没有任何的进展,请兄弟们一起来讨论讨论。
今天特别的高兴,我一下就搞定了FC5系统默认安装的apache和tomcat整合 ,太爽了,我在网上看到的有关apache和tomcat的整合,都是下载软件包重新编译和安装,但是系统本身就带有apache和tomcat,为什么不将系统自带的apache和tomcat整合呢?我在windows下整合了apache2.2.3和tomcat5.5.17,在linux下重新编译安装apache和tomcat,但是我最想的还是把系统自带的给整合,经过一个多星期的不泄努力,终于搞定,我系统的apache是2.2.2的tomcat是5.5.15的,apache2.2以上版本都带有mod-proxy-ajp.so模块,该模块可以让tomcat通过代理访问apache,在系统中该模块是动态加载的,在httpd.conf文件中找不到该模块加载的相关信息。下面是我的成果,和大家一起分享:

1.打开apache的配置文件(httpdconf);

2.找到
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost  *:80
#

将#NameVirtualHost *:80前面的“#”去掉()
你可以将‘*’号改为你的IP(这样改的话就可以远程访问你的服务器,但必须保证你主机的IP是公网IP,否则不能远程访问)

3.找到
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#   DocumentRoot /usr/share/tomcat5/webapps/ROOT
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

以下是在我本机上所作的修改
<VirtualHost 210.40.39.8:80>
    ServerAdmin suang_kcs@163com
   DocumentRoot /usr/share/tomcat5/webapps/ROOT
    ServerName 210.40.39.8
    ProxyPass / ajp://210.40.39.8:8009/
    ProxyPassReverse / ajp://210.40.39.8:8009/
    ErrorLog logs/dummy-host.210.40.39.8-error_log
    CustomLog logs/dummy-host.210.40.39.8-access_log common
</VirtualHost>

上面是我本机上所作的修改,公大家参考
做以上的修改就可以了么?
貌似楼主只是启用了虚拟主机功能啊

tomcat等程序都是安装的FC5里面自带的?用rpm安装的?

我在centos里面无法用yum安装tomcat啊?我的源用的是be10.com的
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.