Access docker container from inside of the container via external URL

I run docker version 17.03.1-ce, build c6d412e with docker compose on a centos 7 based system

Linux rs226736 3.10.0-514.21.1.el7.x86_64 #1 SMP Thu May 25 17:04:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I have two different docker containers hosting web based applications (atlassian JIRA and Confluence). The two docker container are made accessible from outside via a third container (nginx / proxy_pass). I can access the web applications from outside/browser in general. But later on I run into some kind of network problems…

Both containers (jira and confluence) should be able to connect each other and should be able to access themselfes via the external url (e.g. or managed by nginx. But this does not seem to work and when I check with curl:
curl -H "Accept: application/json" -v
from inside of the jira and confluence containers I get this error:
`* Trying <PUBLIC_IP>…

  • connect to <PUBLIC_IP> port 443 failed: No route to host
  • Failed to connect to port 443: No route to host
  • Closing connection 0
    curl: (7) Failed to connect to port 443: No route to host`

When I run the same curl statement from outside of the docker container (e.g docker host or laptop) it works fine!

I wonder if there is any way of making the docker containers accessible from inside of the containers but via the external URL. Any hint pointing me to the right direction would be very much appreciated!

I am not sure what kind of configuration might be relevant. I will provide anything later on if requested.

After some discussion with the provider of the virtual server it turned out, that conflicting firewall rules between plesk firewall and iptables caused this problem. After the conflict had been fixed by the provider the container could be accessed.

This problem is solved now - thank to anyone who participated!