use*_*511 6 apache proxy tomcat mod-proxy tomcat7
我正在使用Apache 2.2.16和Tomcat 7.0.16.我有3个Tomcat实例,它执行3个不同的war文件.为了绕过请求,我已经使用mod_proxy配置了httpd.
3个Tomcat实例在8080,8090,8099中运行.找到下面的httpd配置
ProxyPass /bor `http://localhost:8080/bor/
ProxyPass /borcafews/ `http://localhost:8090/borcafews/
ProxyPass /borechws/ `http://localhost:8099/borechws/
Run Code Online (Sandbox Code Playgroud)
我在8090和8099中间歇性地得到502代理错误.所以我在httpd.conf中设置了以下变量
<Location /borcafews/>
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>`
Run Code Online (Sandbox Code Playgroud)
设置此配置后,borcafews没有给出任何代理错误,但对于borechws,间歇性地失败了502-Proxy Error.
proxy: Error reading from remote server returned by /borechws/services/bor (20014)Internal error: proxy: error reading status line from remote server localhost:8099
请帮我解决这个问题.
小智 0
我不确定这是您的 Apache 配置中的错误:您的 tomcat 应用程序完全有可能返回错误的答案。
使用tcpdump或tshark捕获相关端口的流量。这将验证您的 tomcat 应用程序是否返回有效的 HTTP 响应。