• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle



  • As others have said, you have bound your host port 8080 to container port 9090 and then you use caddy to reverse proxy to container port 8080, which doesn’t exist.

    As for DNS, it’s just a translation system - you send a domain, it returns its IP (for A or AAAA), everything else is done on server. So your current setup works.

    Yes, you can deactivate the port, if you’re not gonna use it on the host, you don’t need it. Since you’re connecting via the internal network, you’re not using the bound ports.

    As a side note, use some firewall and disable everything but 80, 443 and 22, you should not leave other ports open, especially if you’re binding all the ports in docker like that.

    And perhaps make it a good habit to bind ports to 127.0.0.1 by default, that way no one outside the local server can access them. You can do it like this: “127.0.0.1:8080:9090”