I’m hoping someone can help me figure out what I’m doing wrong.
I have a VM on my local network that has Traefik, 2 apps (whomai and myapp), and wireguard in server mode (let’s call this VM “server”). I have another VM on the same network with Traefik and wireguard in client mode (let’s call this VM “client”).
- both VMs can can ping each other using their VPN IP addresses
- wireguard successfully handshakes
- I have
myapp.mydomain.com
as a host override on my router so every computer in my house points it to “client” - when I run
curl -L --header 'Host: myapp.mydomain.com'
from the myapp container it successfully returns the myapp page.
But when I browse to http://myapp.mydomain.com
I get “Internal Server Error”, yet nothing appears in the docker logs for any app (neither traefik container, neither wireguard container, nor the myapp container).
Any suggestions/assistance would be appreciated!
Is the browser also using the LAN router for DNS? Some browsers are set to use DoT or DoH for DNS, which would mean they’d bypass your router DNS.
Do you also get “Internal Server Error” if you make the request with curl on the CLI on the laptop?
How did you check that mydomain is being resolved correctly on the laptop?
What do you get with curl from the other VM, or from the router, or from the host machine of the VM?
Thanks so much for helping me troubleshoot this, @[email protected]!
My browser was using DoH, but I turned it off and still have the same issue.
Yes, running
curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51
on the laptop results in “Internal Server Error”.ping whoami.mydomain.com
hits 192.168.1.51.From the router:
Shell Output - curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0- 100 17 100 17 0 0 8200 0 --:--:-- --:--:-- --:--:-- 17000 100 21 100 21 0 0 649 0 --:--:-- --:--:-- --:--:-- 649 Internal Server Error
From the wireguard client container on the “client” VM:
curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 Internal Server Error
From the traefik container on the “client” VM:
$ curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 Internal Server Error
From the “client” VM itself:
# curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 Internal Server Error
From the wireguard container on the “server” VM:
# curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 Internal Server Error
From the traefik container on the “server” VM (This is interesting. Why can’t I ping from this traefik installation but a can from the other? But even though it won’t ping, it did resolve to the correct IP):
$ ping whoami.mydomain.com PING whoami.mydomain.com (192.168.1.51): 56 data bytes ping: permission denied (are you root?)
From the “server” VM itself:
# curl -L -k --header 'Host: whoami.mydomain.com' 192.168.1.51 Internal Server Error
Also, just to make sure the app is indeed running, I curled it from it’s own container (I’m using myapp here instead of whoami, because whoami doesn’t have a shell):
$ curl -L -k --header 'Host: myapp.mydomain.com localhost:8080
I can’t seem to display html tags in this comment, but the results are the html tags for the web page for the app - so the app is up and running