IIS ARR Rewrite 502.3 Bad Gateway

If you happen to hit the err below, when rewriting to local server with ssl,

HTTP Error 502.3 - Bad Gateway

A security error occurred

Most likely causes:

  • The CGI application did not return a valid set of HTTP errors.
  • A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.

Things you can try:

  • Use DebugDiag to troubleshoot the CGI application.
  • Determine if a proxy or gateway is responsible for this error.

try disabling some of the ssl security as specified here: https://docs.microsoft.com/en-us/iis/extensions/configuring-application-request-routing-arr/arr-support-added-for-winhttpoptionsecurityflags

reg.exe add "HKLM\SOFTWARE\Microsoft\IIS Extensions\Application Request Routing\Parameters" /v SecureConnectionIgnoreFlags /t REG_DWORD /d 0

and then set the value to 0x00003300