Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Reverse Proxy Partially Working with Apache 2 (v2.4.38 Debian)

  • 580 Views
  • Last Post 31 October 2020
jyles.coad-ward posted this 31 October 2020

I have got a reverse proxy partially working with the latest version of AMP (2.0.8.0). I can login and see my instances, but I cannot change any of the settings or manage any of my instances.

Diagnostics Data

OS  Linux
Platform    Debian GNU/Linux 10 (buster)
System Type x86_64
Virtualization  None
Module  ADSModule
Loaded Plugins  FileManagerPlugin, EmailSenderPlugin, WebRequestPlugin, LocalFileBackupPlugin, CommonCorePlugin
Application Name    AMP
Application Version 2.0.8.0
Release Stream  Release
Build Date  29/10/2020 18:06
InstanceID  07576290-144c-4c05-bb49-55608a3844ad
Last Executable /usr/bin/ldd
Last Arguments  --version

Attempting logging in showing that I cannot manage instances.

Apache2 Config

<virtualhost *:80="">
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/blank

        Header always set Strict-Transport-Security "max-age=15768000"
        AllowEncodedSlashes     NoDecode

        ServerName hosting.dariox.club
        ServerAlias hosting.dariox.club

        ProxyPass "/dash/stream/" "ws://127.0.0.1:8080/stream/"
        ProxyPassReverse "/dash/stream/" "wss://127.0.0.1:8080/stream/"
        ProxyPass "/dash/" "http://127.0.0.1:8080/"
        ProxyPassReverse "/dash/" "https://127.0.0.1:8080/"
        ProxyPreserveHost On
ProxyPreserveHost On
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</virtualhost>

<location></location><location>
        AuthType Basic
        AuthName "Wrapper auth"
        AuthBasicProvider file
        AuthUserFile "/var/www/goaccess/.htpasswd"
        Require valid-user
</location>

AMP Webserver Settings

################################
# Webserver
################################
# Webserver.Port
# Webserver.IPBinding
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.UsingReverseProxy=True
Webserver.ReverseProxyHost=hosting.dariox.club

AMP Login Config

################################
# Login
################################
Login.UseAuthServer=False
# Login.AuthServerURL - The URL for the ADS instance providing authentication when using UseAuthServer
Login.AuthServerURL=media.dxcdn.net
Login.MetricsServerPort=0
Login.LDAPAllowAuthOnAnyDomain=False
Login.LDAPAuthDomain=

Mike posted this 31 October 2020

We do not support Apache as a reverse proxy for AMP, we only offer official support for nginx as a proxy. It looks like at a glance that some headers are not being correctly forwarded though.

Also your auth server URL is invalid, it needs to be a full url (https://example.com) rather than just the domain. The ReverseProxyHost must be an IP rather than a hostname.

AMP also requires that it's on its own subdomain, so https://panel.mydomain.com/ is fine, https://mydomain.com/panel will not work and lots of features will work incorrectly.

Close