OneBox not working for domain names on same host IP

Hello,

I’m running into a bug. To be totally honest, I think it’s a docker problem but since I’m using Docker only for Discourse I’m taking my chances and I think others might be interested here.

Recently my discourse install (https://forum.domainname.com/) was on the same server as my website (https://www.domainname.com/) with Nginx as reverse proxy.
I moved the discourse install to a new server with the same configuration (Nginx as reverse proxy). Everything was fine until I moved my website to the new server.

Some people told me that the Onebox feature wasn’t working anymore. As I investigated I realised that it wasn’t working only for my domain name.
So I tested entering the docker container and the thing is I can’t connect to my website from within the docker container, all other external IP are working but I can’t connect to my server external IP nor localhost.
Honestly I don’t understand why, the configuration is exactly the same as the old server.

Best regards

This situation has been there ages. That was the main reason why I moved Discourse to separate VPS.

But nice if it can be solved out because after that I can save around 40 euro a month.

Honestly, I didn’t have this problem before, I always had my website and my discourse install on the same server.

My guess is a dns issue.

Does your /etc/hosts have your hostname with 127.0.0.1 as the address?

If so, remove the local host ip, as the container can’t connect there. (You bought also be able to include the external host ip in the hosts file of the container.

It’s not a DNS issue as the docker container finds the good domain name IP address. When I curl from the discourse container the request time out as it can’t connect to the 443 port.

1 Like

Ok so I’ve managed to make it work.

So for anyone who’s interested (ie: @Jagster )

If you’re using a firewall on linux (I’m using arno-iptables-firewall)

  • list your network devices “ifconfig”, by default docker create a network device called docker0
  • open your firewall config and put docker0 in the TRUSTED_IF section
  • restart your firewall then restart docker
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.