NGINX Reverse Proxy: https://mydomain.com/amp/ not serving instances

  • 92 Views
  • Last Post 2 weeks ago
  • Topic Is Solved
HardToPort posted this 5 weeks ago

OS Name/Version:

$ cat /etc/centos-release  
CentOS Stream release 8

Product Name/Version:

$ ampinstmgr --version
[Info] AMP Instance Manager v2.0.8.10 built 15/12/2020 17:10
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV

Problem Description:

Hello all,

I wanted to run multiple web services on the same domain, so I tried to set up a custom NGINX reverse proxy config. The two services are AMP and the Minecraft Spigot statistics plugin, PLAN. After mucking around a bit with the config, I got Plan to work perfectly at mydomain.com/plan.

However, AMP would let me log in, but then I couldn't access any of the instances; clicking, double clicking, or hitting manage would do nothing.

AMP Main Page

I tried opening up the browser's developer console, and I got these screenshots:

Local HTTP, not secure:

Working Amp

External HTTPS, SSL secure:

Broken Amp


My screenshots don't seem to be showing up. Here's the direct links:

https://i.ibb.co/YLYVhH4/amp-main-page.png

https://ibb.co/XCFbJM3 https://i.ibb.co/6WDmsL1/working-amp.png

https://ibb.co/BT5FcMF https://i.ibb.co/F8LCmTC/broken-amp.png


Steps to reproduce:

  • Setup AMP as normal, but not with GetAMP.sh script (manually)
  • Install NGINX and Certbot w/ dependencies
  • Run ampinstmgr setupnginx my.domain.com 8080
  • Edit NGINX config to proxy AMP to mydomain.com/amp/ instead of root mydomain.com/
  • Run another web service that also proxies with NGINX

Actions taken to resolve so far:


Configs


NGINX

NGINX Config

https://pastebin.com/9L3PcrZj

Firewall Config:

sudo firewall-cmd --list-ports
8080/tcp 25565/tcp 19132/udp 8804/tcp 2223/tcp 2224/tcp 25565/udp 2225/tcp 2226/tcp 25566/tcp 25566/udp 25567/tcp 25567/udp 80/tcp 443/tcp

ADS01:

ADS01 Config

https://pastebin.com/5sGajwev

Minecraft Server:

Minecraft Server Config

https://pastebin.com/MCHHvuKL

Order By: Standard | Newest | Votes
Mike posted this 4 weeks ago

You can't do this I'm afraid - AMP must be on its own subdomain. It cannot be run as a subdirectory of another domain. So you should instead do ampinstmgr setupnginx amp.mydomain.com 8080 and set up a record for amp.mydomain.com.

HardToPort posted this 2 weeks ago

To anyone using a free DNS service/dynamic DNS, you can go as deep as you want with subdomains. where.is.my.server.com

Close