調試程序的時候,網頁上報這個錯誤,後臺也是錯誤。重啓一下程序後,去掉全部斷點,程序正常:我猜想個人異常緣由是:調試時間過長,超過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 服務