502 Bad Gateway in conjunction with Nginx Reverse Proxy

**Note: If you do not fill in all the fields, your contribution will not be answered. You must indicate the steps you have taken so far and the actions you have already taken. Make sure to remove this note from your post as well **.

Operating system name/version: debian-11.6.0-amd64

Product name/version: AMP Instance Manager v2.4.6.2

Problem Description:

When calling https://amp.pg92.net/ I get a 502 bad gateway (openresty). I can rule out the reverse proxy configuration to that extent.

Steps to reproduce:

The problem seems to be within the Nginx web server configuration in AMP or within the AMP Config, see AMPConfig.conf.

Actions taken so far to resolve the issue:
Troubleshooting. This is not a firewall issue.

Nginx Configuration:

#AMP Configuration File
################################
#DO NOT EDIT WHILE AMP IS RUNNING
################################

################################

Security

################################
Security.ExecPath=Exec
Security.AllowConcurrentSessions=True
Security.LogAuthFailures=False
Security.AuthFailureLogPath=./AuthFailures.log
Security.LogSensitiveProcArgs=False
Security.EncIV=w/w/DduHkEKwEnjvqobv/g==
Security.EnablePassthruAuth=True

Security.PassthruAuthLocalOnly - Only allows auth requests that come from 127.0.0.1 - careful when using a controller that is bound to a specific IP rather than 0.0.0.0!

Security.PassthruAuthLocalOnly=False
Security.AuthFailureTimeWindow=5
Security.AuthFailureAttemptsInWindow=5
Security.TwoFactorMode=Required
Security.RequireSessionIPStickiness=True
Security.AllowAPIDiscoveryWithoutLogin=False

################################

Webserver

################################

Webserver.Port - NEVER CHANGE THIS SETTING MANUALLY! Always use ampinstmgr rebind to alter IP/Port bindings. IF YOU CHANGE THIS ON ADS YOU WILL BREAK YOUR LOGINS!

Webserver.Port=8080

Webserver.IPBinding - NEVER CHANGE THIS SETTING MANUALLY! Always use ampinstmgr rebind to alter IP/Port bindings. IF YOU CHANGE THIS ON ADS YOU WILL BREAK YOUR LOGINS!

Webserver.IPBinding=0.0.0.0
Webserver.SessionTimeout=5
Webserver.NoUI=False
Webserver.FilterEndpoints=False
Webserver.AllowedEndpointIPs=[“127.0.0.1”]
Webserver.CertificatePath=
Webserver.CertificateSerial=
Webserver.CertificateDomain=
Webserver.CertificatePassword=
Webserver.EnableWebSockets=True
Webserver.EnablePluginWSStreams=False
Webserver.EnableFetchPostEndpoints=True
Webserver.APIRateLimit=1000
Webserver.AllowGETForAPIEndpoints=False
Webserver.UsingReverseProxy=True
Webserver.ReverseProxyHost=172.19.11.2
Webserver.CORSOrigin=
Webserver.DisableCompression=False

################################

Login

################################
Login.UseAuthServer=False

Login.AuthServerURL - The URL for the ADS instance providing authentication when using UseAuthServer

Login.AuthServerURL=https://amp.pg92.net/
Login.MetricsServerPort=12820
Login.UseLDAPLogins=False
Login.LDAPAuthDomain=
Login.LDAPGroupPrefix=AMP_

################################

Branding

################################
Branding.DisplayBranding=False
Branding.PageTitle=Provider Page Title Not Set
Branding.CompanyName=
Branding.WelcomeMessage=
Branding.BrandingMessage=
Branding.ShortBrandingMessage=PoweredByAMP
Branding.URL=
Branding.SupportURL=
Branding.SupportText=
Branding.SubmitTicketURL=
Branding.LogoURL=
Branding.BackgroundURL=
Branding.SplashFrameURL=
Branding.ForgotPasswordURL=

################################

AMP

################################
AMP.InstanceID=2d4d409f-5b84-4548-99b8-aa6474e23b34
AMP.InstanceName=ADS01
AMP.FriendlyName=ADS
AMP.AppModule=ADSModule
AMP.LoadPlugins=[“FileManagerPlugin”,“EmailSenderPlugin”,“WebRequestPlugin”,“LocalFileBackupPlugin”,“CommonCorePlugin”]
AMP.ScheduleOffsetSeconds=0
AMP.AppStartupMode=StartApplication
AMP.FirstStart=True
AMP.ShutdownProperly=True
AMP.Suspended=False
AMP.SuspendReason=
AMP.RequireActivation=False
AMP.PreviousVersion=
AMP.DatastoreConnectionString=./datastore.dat
AMP.MapAllPluginStores=True
AMP.IgnoreCTRLC=False
AMP.Theme=Black
AMP.PrimaryEndpoint=0.0.0.0:2223
AMP.PrimaryEndpointUri=sftp://0.0.0.0:2223
AMP.DisplayBaseURI=

################################

Monitoring

################################
Monitoring.UseMulticoreCPUCalc=True
Monitoring.IgnoreSMTCores=True
Monitoring.ConsoleScrollback=10

Monitoring.TitleSuffix - Suffix to append to the terminal title

Monitoring.TitleSuffix=
Monitoring.KeepProvisionConfigs=False
Monitoring.LogLevel=5
Monitoring.EnableConsoleColoring=True
Monitoring.LogsDirectory=AMPLogs
Monitoring.ProduceStartupScripts=False
Monitoring.DeleteOldLogs=True
Monitoring.LogRetentionDays=28
Monitoring.AuditLogRetentionDays=14
Monitoring.FullMetricsGathering=False
Monitoring.ReportPhysicalMemoryAsTotal=False
Monitoring.MetricsPollInterval=1000
Monitoring.ServerLocale=en

################################

Privacy

################################
Privacy.PrivacySettingsSet=False
Privacy.AutoReportFatalExceptions=True
Privacy.AllowAnalytics=False

################################

Limits

################################
Limits.NumericValueNodeUpperLimits={}
Limits.NumericValueNodeLowerLimits={}

Check out Setting up secure HTTP (HTTPS) with AMP
Your nginx config seems to be wrong as the destination is wrong.

Indeed. Nginx should be proxying AMP on http and port 8080

Which nginx config file specifically?

The config as shown in your screenshot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.