Closed sayidhe closed 3 weeks ago
Easiest way is to use CaddyServer
as SSL proxy and expose websocket port.
I have that setup already and will see if I get time to do the write-up.
I have tried to use Nginx, but still failed. I can connect through the IP address and port, but not through the domain.
The config file as below
server {
server_name my_domain.com;
location / {
proxy_pass http://localhost:1883;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
This won't work since Websocket uses ws://
and Secure Websocket uses wss://
prefix.
CaddyServer
gives both Free SSL and reverse proxy together.
@sayidhe
Check README.md
5.1
for instructions.
Hi,
I have successfully set up the Mosquitto Docker on my server, but I'm not sure how to add a domain for it and also enable Let's Encrypt.