Tag Archives: Apache2.4 Reason: Error reading from remote server

How to Solve Apache2.4 Reason: Error reading from remote server

When using Apache to reverse proxy IIS, the following errors always appear:

ProxyError
Theproxyserverreceivedaninvalidresponsefromanupstreamserver.
TheproxyservercouldnothandletherequestGET/.

R eason:Errorreadingfromremoteserver

The official explanation for this problem is: when Mod_ When a proxy sends a request to an original server that does not properly implement the persistent connection (keepalive) or http/1.1, it can send the HTTP/1.0 request without the persistent connection (keepalive) by setting two environment variables. These two variables are set through the setenv instruction

The solution is as follows: just copy the following two pieces of code into httpd.conf

SetEnvforce-proxy-request-1.01
SetEnvproxy-nokeepalive1

You can copy to & lt; VirtualHost*> Between & lt/ VirtualHost>, Valid only within a virtual machine

You can also copy to & lt; VirtualHost> Outside, so that all reverse agents can use the above two pieces of code