[Web] apache与tomcat死活整合不了,请求高手指教,快疯了!!!

weixin_38065454 2004-11-28 04:56:19

已经试验了网上的多篇文章,现在的过程为,
将mod_jk2.so拷贝至apache服务器的模块目录中,
编辑Apache配置文件
                Apache配置文件一般会在安装目录的conf目录下,如/usr/local/apache2/conf
                编辑/usr/local/apache2/conf/httpd.conf文件,在文件末尾增加以下内容
                LoadModule jk2_module modules/mod_jk2.so
            
           编辑workers2.properties文件。
                在/usr/local/apache2/conf目录下建立文件workers2.properties文件,文件内容如下
            # workers2.properties
            
            [logger]
            level=DEBUG
            
            [config:]
            file=${serverRoot}/conf/workers2.properties
            debug=0
            debugEnv=0
            
            [uriMap:]
            info=Maps the requests. Options: debug
            debug=1
            
            # Alternate file logger
            #[logger.file]
            #level=DEBUG
            #file=${serverRoot}/logs/jk2.log
            
            [shm:]
            info=Scoreboard. Required for reconfiguration and status with
            multiprocess servers
            file=${serverRoot}/logs/jk2.shm
            size=1000000
            debug=0
            disabled=0
            
            [workerEnv:]
            info=Global server options
            timing=1
            debug=1
            
            [channel.socket]
            info=Ajp13 forwarding over socket
            debug=1
            tomcatId=localhost:8009
            
            
            [status:]
            info=Status worker, displays runtime informations
            
            [uri:/examples/*]
            info=Map the whole webapp
            #此处的examples为6.3中所定义的虚拟目录
            
            [uri:/jsp/*]   
            #此处定义jsp为6.3中所定义的虚拟目录
            
         修改/usr/local/jakarta-tomcat-5/conf/server.xml文件
                找到<Host>;部分,将此处的
                在<Host>;</Host>;标签中增加<Context>; </Context>;,如下
            <Host name="localhost" debug="0"
            appBase="/usr/local/apache2/htdocs/webapps"
                   unpackWARs="true" autoDeploy="true"
                   xmlValidation="false" xmlNamespaceAware="false">;
            <Context path="/examples" docBase="servlets-examples" debug="0"
                             reloadable="true" crossContext="true">;
                      <Logger className="org.apache.catalina.logger.FileLogger"
                                 prefix="localhost_examples_log." suffix=".txt"
                          timestamp="true"/>;
            </Context>;
               
               <Context path="/jsp" docBase="jsp-examples" debug="0"
                             reloadable="true" crossContext="true">;
               </Context>;
            </Host>;
但是还是不行,出现如下错误:Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later
.
请高手指点一下,不然眼看一个freebsd新手就疯掉了
...全文
13 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧