I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let’s call the website http://mywebsite.com. The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1 and I want to establish an MQTT connection via mosquitto and I’m sending the data on topic test

The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works
Example link
But if I change the IP address 192.144.0.5 with mywebsite.com/client1 I can’t connect to mosquitto and I can’t send or receive any form of data
Example link
any idea on how to solve this problem

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @zaouaouizakaria,

Do you get any errors when you add your domain name? I could suggest checking your logs with the docker logs container_id command.

Also in order to use your domain name instead of your IP address, you would need to configure your DNS so that your A record points to the IP address of your server.

After the DNS change, it can take up to 24-48 hours for the DNS to propagate over the Globe.

Regards,
Bobby

Submit an Answer