Apache 502 The proxy server 解决办法

分类:CentOS运维 阅读:80262 次

Apache 使用代理出现
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: DNS lookup failure for: xxx.xxx.com
错误,解决办法:

在apache配置文件http.conf或vhost.conf中的

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
如:

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



SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1加到外面使用与所有主机