当前位置:首页 > 开发 > 系统架构 > Apache > 正文

apache 做代理 报如下错误:The proxy server received an invalid response from an upstream

发表于: 2014-04-05   作者:baalwolf   来源:转载   浏览:
摘要: 网站配置是apache+tomcat,tomcat没有报错,apache报错是: The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /. Reason: Error reading fr

网站配置是apache+tomcat,tomcat没有报错,apache报错是:

The proxy server received an invalid response from an upstream server. 
The proxy server could not handle the request GET /. 
Reason: Error reading from remote server

解决的方法:

For circumstances where mod_proxy is sending requests to an origin server that doesn't properly implement keepalives or HTTP/1.1, there are two environment variables that can force the request to use HTTP/1.0 with no keepalive. These are set via the SetEnv directive. 
These are the force-proxy -request-1.0 and proxy -nokeepalive notes.

当mod_proxy向一个没有正确实现持久连接(KeepAlive)或HTTP/1.1的原始服务器发送请求的时候,可以通过设置两个环境变量来发送不带持久连接(KeepAlive)的HTTP/1.0请求。这两个变量是通过SetEnv指令设置的。 
以下是force-proxy -request-1.0和proxy -nokeepalive的例子:

编辑 httpd.conf增加这两行:

SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1

之后重启下 apache 服务

apache 做代理 报如下错误:The proxy server received an invalid response from an upstream

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
其中Invalid reply from server是由于dwr返回的数据格式不符合dwr的规范, 所以才会出现这个问题,其
代理(Proxy) 如果想在运行时生成新的对象,并且这个对象的类型是全新的,是现有系统中没有的。就可
检查我们的一台ORACLE数据库的监听日志发现有不少TNS-12502错误信息。如下所示 <pre style="bord
SharePoint 2013爬网报错 An unrecognized HTTP response was received when attempting to crawl t
SharePoint 2013爬网报错 An unrecognized HTTP response was received when attempting to crawl t
Invalid certificate chain (Received fatal alert: certificate_unknown)! 是由于导证书的时候 导
上一篇把upstream的配置和初始化的代码稍微分析了一下。本篇主要用图来解释一下upstream反向代理在
上一篇把upstream的配置和初始化的代码稍微分析了一下。本篇主要用图来解释一下upstream反向代理在
本篇文章是SQL Server代理系列的第五篇,详细内容请参考原文。 正如这一系列的前几篇所述,SQL Serv
SQL Server代理是所有实时数据库的核心。代理有很多不明显的用法,因此系统的知识,对于开发人员还
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号