Link to home
Start Free TrialLog in
Avatar of Ishan Deshpande
Ishan Deshpande

asked on

502 Proxy error : Error reading status line from remote server

Hi,
   We are facing 502 proxy error: Error reading status line from remote server <dns>:<port>   when we try to  reverse proxy to Apache server from our apache server. OS is Redhat linux. A simple redirect works but not the proxy. Also we see the 200 ok only through browsers and not curl or wget commands.  We tried setting  SetEnv proxy nokeepalive 1   but still no luck. Any suggestions for the same.
Avatar of David Favor
David Favor
Flag of United States of America image

There's a set of bugs which incorrectly produce 502 proxy error messages.

Before you go too deep debugging this, be sure to update to at least Apache-2.4.16 + preferably Apache-2.4.26 which is latest stable.
are you chaining proxies? what is the setup like. is this a new setup or it worked before but after a change does not work now?
Check whether missing Agent info request is ......

As David one could look at the error and see what conditions lead to it. The other is as you've started which seems to suggest the use of certain tools curl, wget is what leads to this error..

The issue could be the requested URL does not match the reverse proxy configuration to direct the request to the correct destination.

config of the reverse proxy would help.
Some apps detect the source of the request and reflect the IP (internal in this case) in the response which breaks the access by the user....
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.