阿莫看进来,关于论坛老是出错的问题
这两天访问ourdev有时候很慢,不时还会出现错误,相信大家都遇到了吧:Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /bbs/bbs_list.jsp
Reason: Error reading from remote server
查了下apache的文档:
应该是Apache和Proxy_mod的BUG:
------- Additional Comments From 2006-07-05 16:05 -------
With the following 'Murxaround' it's working now:
- Added 'keeplive Off' in httpd.conf-> No effect
- Set keep-alive timeout to 1 day in IIS -> No effect
- Added
'SetEnv force-proxy-request-1.0 1'
'SetEnv proxy-nokeepalive 1'
in httpd.conf
It's working now without errors since 30 hours...
Don't know if first steps were necessary, I let them in place
解决办法,修改 httpd.conf,追加两行配置:
SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1
虚拟主机的设置方式:
<VirtualHost*:80>
ServerAdmin asion@mail.com
ServerName www.domain.com
ProxyPass / http://192.168.0.92
ProxyPassReverse/ http://192.168.0.92
SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1
</virtualHost>
重启Apache, 正常!
-------------------------------------------------------------------------
apache文档:http://httpd.apache.org/docs/2.3/mod/mod_proxy.html
当mod_proxy向一个没有正确实现持久连接(KeepAlive)或HTTP/1.1的原始服务器发送请求的时候,可以通过设置两个环境变量来发送不带持久连接(KeepAlive)的HTTP/1.0请求。这两个变量是通过SetEnv指令设置的。
以下是force-proxy-request-1.0和proxy-nokeepalive的例子:
<Location /buggyappserver/>
ProxyPass http://buggyappserver:7001/foo/
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
如果为虚拟主机可在httpd.conf的VirtualHost里追加上面两行设置:
<VirtualHost *:80>
..................
SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1
</VirtualHost>
-----------------------------------------------------------
阿莫试试吧 最近经常遇到这个问题今天早上7点40到8点30都进不去 回复【1楼】bbssr
最近经常遇到这个问题今天早上7点40到8点30都进不去
-----------------------------------------------------------------------
是的 图片为证
http://cache.amobbs.com/bbs_upload782111/files_33/ourdev_585708ZFCFV5.JPG
(原文件名:未命名1.JPG)
http://cache.amobbs.com/bbs_upload782111/files_33/ourdev_585709P8QJ7W.JPG
(原文件名:未命名.JPG)
但是现在正常了 我早上也进不去。
页:
[1]