Only One Reverse Proxy Working Locally

1. My Caddy version (caddy version): V1

2. How I run Caddy:

a. System environment:

Docker. Specifically abiosoft/caddy. Running on Ubuntu Server 18.04.3 LTS

b. Command:

Using Portainer so don’t have the full docker command any more.

c. Service/unit/compose file:

NA

d. My complete Caddyfile or JSON config:

domain.tld {
    browse
    log stdout
}

portainer.domain.tld {
    proxy / portainer:9000
    log stdout
}

# ecommerce.domain.tld {
#     proxy / wordpress {
#         transparent
#     }
#     log stdout
# }

3. The problem I’m having:

This has been a long debug process for me and seems like a weird issue that is probably related to me being very new to Caddy and setting up domains in general. I have been trying to set up Caddy as a reverse proxy to a few different docker containers running on a desktop I am using as a server. Caddy works great for what I need and I have been using it without issue to view my Portainer instance for a few weeks.

Today I wanted to set up my second subdomain to look at a Wordpress instance. After some fiddling around I got Caddy to display Wordpress fine, but when I tried to have both domains active at the same time I ran into issues.

The first subdomain I hit after starting Caddy normally works right away. The second subdomain will time out and will continue to time out until it randomly starts working and the other domain starts timing out. This only happens when I am inside my local network (the server and my desktop are both attached to the same router). If I turn on my VPN and give myself an external IP both subdomains work correctly and I haven’t noticed any issues.

At first I thought it was a DNS issue. I changed my computer’s DNS to googles and also changed my router’s. No luck. My router has the ports 80 and 443 forwarded to caddy. I also tried turning my router’s firewall off to see if that would change anything. It didn’t seem to have any effect at all.

I probably have a basic misunderstanding of how this is supposed to work. I was hoping to set up a few different “sites” running on my local server that I could access from both inside and outside my local network. Is this not possible? I hope I gave enough information for you to understand what I have done. Let me know if I can provide anything else that is helpful.

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