Keyword: Apache
502
Proxy
Error
Recently, when a website was deployed, an error was reported, indicating that HTTP 502 was incorrectly referenced.
Proxy
Error
The proxy
Server received ed an invalid response from an upstream
Server.
The proxy
Server cocould not handle
Request get /.
Reason: Error
Reading from remote
Server
I haven't seen any reason after reading it for a long time. It's just good! After a while, the website can be opened again ....
Check Apache
Access_log. Reference found... Get/
HTTP/1. 0 ....
This is accessed by ie5.5. So I got another ie5.5 server (it's hard to handle it all the time. This is not enough !!) An error occurred. There are other machine access errors. I refreshed it for a while!
In this case, Google found that it was about mod_proxy, and GB of his document.
Http://httpd.apache
. Org/docs/2.3/MoD/mod_proxy.html
Found this paragraph
Reference for circumstances where mod_proxy is sending requests to
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.
This is probably the reference (not translated by me) When mod_proxy sends a request to an original server that does not correctly implement a persistent connection (keepalive) or HTTP/1.1, you can set two environment variables to send HTTP/1.0 requests without keepalive. These two variables are set through the setenv command.
Force-proxy
-Request-1.0 and proxy
-Nokeepalive example:
- <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>
<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>
Restart Apache
Access o from ie5.5