调试程序的时候,网页上报这个错误,后台也是错误。重启一下程序后,去掉全部断点,程序正常:我猜想个人异常缘由是:调试时间过长,超过Apache服务器等待时间,故保存。apache
网上搜了一下该问题的解决方案:加长长时间请求,能够看出我上面的猜想是正确的。tomcat
附网上的解决方法:http://blog.163.com/fumei2010@126/blog/static/13284928620125110144180/服务器
apache 作代理 报以下错误:The proxy server received an invalid response from an upstream server. 网站
网站配置是apache+tomcat,tomcat没有报错,apache报错是:spa
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.server
当mod_proxy向一个没有正确实现持久链接(KeepAlive)或HTTP/1.1的原始服务器发送请求的时候,能够经过设置两个环境变量来发送不带持久链接(KeepAlive)的HTTP/1.0请求。这两个变量是经过SetEnv指令设置的。
如下是force-proxy -request-1.0和proxy -nokeepalive的例子:blog
编辑 httpd.conf增长这两行:ci
SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1
以后重启下 apache 服务