I’m aware there is another thread on this, but I believe it is a little out of date. Since learning about nginx, I’ve been able to close all of my ports down except for 80,443 and use subdomains for all of my services. I setup a subdomain and then create a server block for each sub and then used this guide to use let’s encrypt for SSL generation and renewal, as well as forcing all traffic to https. It’s pretty easy to do, and best of all you don’t have to bother setting up ssl on your endpoint. The proxy takes care of everything. Plus you only have to setup the server block for non SSL, as the scripts will take care of the certs for you.
However the only thing I can’t get working is mqtt. Ideally I’d like to use mqtt.example.com on 80,443 and have nginx handle everything else. But I’m kind of stumped as I can’t get a connection. Is there something else involved in the setup, such as a different protocol? From reading old threads I suspect web-sockets might be involved, but the current documentation doesn’t mention this.
If anyone can explain how I could use port 80 and show what the server block, mosquito config, and configuration.yaml should look like, I would greatly appreciate it. No SSL or authentication necessary, as I just want to get it working in the clear for now.