1

Hello everyone,

I've got a somewhat special issue with my setup.

I am running an instance of `lucaslorentz/ caddy-docker-proxy` as proxy that handles certificates and request and proxies them to docker containers that run `abiosoft/caddy:php` to host Laravel based applications. The problem is, that the `abiosoft/caddy` containers do not know it's assigned hostname and thus Laravel's `asset`, `secure_asset` and `url` respectively `secure_url` don't work as they use the internal hostname which would be an IP address and thus requests go to 192.168.240.x instead of example.com.

I am not yet entirely sure where I should tackle this problem and am grateful for every hint.

I am currently also evaluating traefik instead of Caddy-docker-Proxy and Caddys v2 official container instead of abiosoft's Caddy v1 container but I guess, that this wouldn't solve the issue as the container still wouldn't know that it's given Domainname is example.com

Comments
  • 0
    You can configure your caddy v1 to send original hostname in proxied requests by setting the "transparent" option in your proxy settings.
  • 0
    @sbiewald I did that but that didn’t work 😕
  • 0
    Okay i‘ve switched to traefik now and now some websites work whereas traefik returns forbidden for others....
  • 0
    Everything works now 🥳
Add Comment