apache 的http代理出错 502 Proxy Error
来源:互联网 发布:seo常用命令 编辑:程序博客网 时间:2024/05/16 12:19
关键字: apache 502 proxy error
前不久刚部署好的网站,忽然访问报错提示错误
Http 502 Proxy Error
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
看了半天也没看出个所以然来, 刚刚还好好的呢!过了一会网站又能打开了....
查看了一下apache的access_log。发现
就这个问题Google了一下发现是mod_proxy的事,又G了一下他的文档
http://httpd.apache.org/docs/2.3/mod/mod_proxy.html
找到了这一段话
重启apache,在拿ie5.5访问O了
引用
Http 502 Proxy Error
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
看了半天也没看出个所以然来, 刚刚还好好的呢!过了一会网站又能打开了....
查看了一下apache的access_log。发现
引用
.....Get / HTTP/1.0....
这是ie5.5以下的版本访问过。所以又找来台ie5.5(挺难整,这年头这玩意少了!!)访问了一下,然后出错。在用别的机器访问错误还有。在刷新了一会又好了! 就这个问题Google了一下发现是mod_proxy的事,又G了一下他的文档
http://httpd.apache.org/docs/2.3/mod/mod_proxy.html
找到了这一段话
引用
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.
译了一下大概是这意思(不是我译的) 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的例子:
以下是force-proxy-request-1.0和proxy-nokeepalive的例子:
- <VirtualHost *:80>
- JkMount /hr/servlet/* worker1
- JkMount /hr/*.jsp worker1
- JkMount /hr/*.do worker1
- ServerAdmin njgnini@163.com
- ServerName www.javaeye.com
- ServerAlias www.javaeye.com.cn
- RewriteEngine On
- RewriteRule ^/$ /hr/ [R,P]
- SetEnv force-proxy-request-1.0.1
- SetEnv proxy-nokeepalive 1
- </VirtualHost>
重启apache,在拿ie5.5访问O了
- apache 的http代理出错 502 Proxy Error
- Apache22 的Http代理出错 Proxy Error !
- Apache22 的Http代理出错 Proxy Error !
- apache的http代理出现 502 Proxy Error
- Apache 代理(Proxy)
- Apache 代理(Proxy) 转发请求
- org.apache.http.*工具包出错的问题
- Python使用HTTP代理 Proxy
- http请求代理proxy-ajax
- Tomcat6.0与Apache的整合(http-proxy方式)
- HTTP代理模块(HTTP Proxy)
- Proxy代理的应用
- Proxy代理的初识
- Apache反向代理(mod-proxy方式)
- tornado http proxy 二級代理
- nginx http proxy 正向代理 实例
- maven 配置文件 启用 代理 http proxy
- android studio http proxy 设置代理
- 关于SQL server 2000中的权限和角色
- 华为往事(六)--开发C&C08的日子
- 深入.NET 4.0之,Tuple一二
- 折腾是检验人才的唯一标准
- 计算机学习博客
- apache 的http代理出错 502 Proxy Error
- Struts2.1.6中关于JSON的配置和使用
- Hibernate QBC查询
- 六一啦
- 智能指针的标准之争:Boost vs. Loki
- 减缓大脑衰退的五项措施
- 彻底抛弃光驱,U盘启动PE安装Windows Xp 101% 成功经验(转载)
- 华为往事(九)--邳州开局
- 曲有误 周郎顾