CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
502 - Web server received an invalid response while acting as a gateway or proxy server
- Article ID:
4239 - Date Created
Wednesday, March 30, 2022 - Last Updated
Monday, February 5, 2024 - This Article Has been Viewed
423 times - Short Desc
IIS ARR Web Server gives 502 bad gateway error. - Details
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed.
When the Web server (while acting as a gateway or proxy) contacted the upstream
content server, it received an invalid response from the content server. - Recreate Issue
Scenario #1:
[SSL Certificates are not the same throughout the IIS Server Farm].
When building an [ARR Server Farm], all machines must match; if not, you will
receive the [502 Bad Gateway error]. The [SSL Certificate] is just one of many
different issues if the configurations are not identical. - Resolve Issue
Scenario #1:
Ensure all [SSL Certificates] are the same on all machines throughout the [IIS Server Farm].
These include the [ARR] (Application Request Routing) and [IIS Servers].
To ensure they are the same, it is best to Export the most recent [SSL Web Server
Certificate] from the known good server and copy and install this certificate
throughout the [IIS Server farm].
All codes are done in Powershell.
If running from a Command Prompt (CMD)
Simply type in: Powershell
Hit enter, and then copy the below codes.
Export
:: First, we need to find out if the SSL key exists
dir cert:\localmachine\webhosting | Where-Object { $_.hasPrivateKey }
:: If it does, then we launch this script
$mypwd = ConvertTo-SecureString -String "PASSWORD-GOES-HERE" -Force -AsPlainText
Get-ChildItem -Path cert:\LocalMachine\webhosting | Export-PfxCertificate -FilePath G:\SSL\Most-Recent-SSL-Cert.pfx -Password $mypwd
:: Copy from the known good IIS Cert to the server to install on.
Copy-Item -Path '\\WebServer-Name\G\SSL\certs\Most-Recent-SSL-Cert.pfx' -Destination \\Webc01\g\SSL\Most-Recent-SSL-Cert.pfx
:: Import to the Server
$pwd = ConvertTo-SecureString -String "PASSWORD-GOES-HERE" -Force -AsPlainText
Import-PfxCertificate -FilePath G:\SSL\Most-Recent-SSL-Cert.pfx Cert:\LocalMachine\WebHosting -Password $pwd
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825