how to do reverse proxy on docker

I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let’s call the website The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be 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 with 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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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