Hey there,
You're on the right track. HTTP and HTTPS do not mix, at all. So the solution is indeed having everything HTTPS or HTTP depending on which is used. Since you're already using a proxy you'd probably just want to tell MistServer to use that fully. Now there's 2 ways to do this.
Setting up Public Address
You can set up a Public Address setting in the HTTP protocol of MistServer.
This option is what you'd use if you're already reverse proxying addresses to MistServers 8080 port. Within Nginx that would mean you've set up a "/location" towards port 8080.
Note: I would recommend using
http://example.com/mist/ and not just doing the https one. That way you can use both http and https using the same syntax. Makes things a lot easier.
Setting up X-Mst-Path
MistServer is also automatically able to detect the reverse proxy address if the reverse proxy incorporates the X-Mst-Path header. Now we don't have a Nginx Proxy Manager example, but our Nginx one is:
location /mistserver/ {
proxy_pass http://localhost:8080/;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_read_timeout 600s;
proxy_set_header Host $host;
proxy_set_header X-Mst-Path "$scheme://$host/mistserver";
} I'm expecting the advanced tab within Nginx Proxy Manager would just let you set these up. As far as I'm aware Nginx Proxy Manager is just a browser interface around Nginx.
Certbot
Certbot most likely failed because you were already using port 80. MistUtilCertbot will start a http connector on port 80 to use and if that port is already in use this will fail.
A way to "fix" this would be de-activating NPM and then running it again, though I can't really recommend this as both the 80 port and the 443 port that will be setup by MistUtilCertbot will be conflicting with NPM and auto-renewal will definitely not work without access to the default http port.
If it was failing for a different reason I'd of course be interested in any info/error message you can share.
Testing it
The Public address solution should fix the links within the 4242 interface, but the X-Mst-Path would not. The "best" way to verify everything working is to visit a stream.html page:
If it doesn't work open the developer console (f12) and look at the network tab to see what addresses are used, or open the page source and look for the player.js path and the streamname.html path. Our embed code always needs those 2 addresses, so editing the embed code to use the correct forwarded locations might be needed if you copy it off the embed page.
With kind regards,
Balder Viëtor
Head of Testing