当前位置: > Linux服务器 > apache >

Apache+tomcat整合之502错误

时间:2016-12-06 13:42来源:linux.it.net.cn 作者:IT

    今天尝试了一下Apache+tomcat整合,apache和tomcat启动都没有报错。但是访问的时候老是报错

    502 Bad Gateway Bad Gateway

             The proxy server received an invalid response from an upstream server.

             在网上找了很久,找不到了,最后还是看日志解决的。下面的是我的配置,找到shsc-access_log.txt配置文件。

             <VirtualHost *>
                ServerAdmin fsdfds@e.com
                DocumentRoot e:/duan/
                ServerName 192.168.1.121:80
                DirectoryIndex index.html index.htm index.jsp index.action
                ErrorLog logs/shsc-error_log.txt
                CustomLog logs/shsc-access_log.txt common
 
               JkMount /*WEB-INF ajp13
               JkMount /*j_spring_security_check ajp13
               JkMount /*.action ajp13
               JkMount /servlet/* ajp13
              JkMount /*.jsp ajp13
              JkMount /*.do ajp13
              JkMount /*.action ajp13
 
              JkMount /*fckeditor/editor/filemanager/connectors/*.* ajp13
             JkMount /fckeditor/editor/filemanager/connectors/* ajp13
       </VirtualHost>
shsc-access_log.txt配置文件,里面有:              
127.0.0.1 - - [18/Feb/2013:10:50:04 +0800] "GET /tes/ HTTP/1.1" 502 232

原来是我把再配置连接的时候,没有分清楚下面两个的区别。

  <Connector port="8088" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8"redirectPort="8450" />
  <Connector port="8010" protocol="AJP/1.3" redirectPort="8450" />

 

workers.tomcat_home=e:/tomcat1
workers.java_home=C:/Java/jdk1.6
ps=/
worker.list=ajp13
worker.ajp13.port=8010   //这个地方配成了8088了。
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

(责任编辑:IT)
------分隔线----------------------------