Traefik as reverse_proxy, Caddy as server for Symfony application

Hello,

I currently work with caddy as a web server for my symfony application.
This configuration file works fine :

{$SERVER_NAME}

log

route {
    root * /srv/back/public
    php_fastcgi unix//var/run/php/php-fpm.sock
    encode zstd gzip
    file_server
}

I want now to se Traefik as a reverse proxy, and keep caddy as web server. How do I need to update the caddyfile to support traefik ?

I already tried this configuration :

:80 {
    root * /srv/back/public
    php_fastcgi unix//var/run/php/php-fpm.sock
    encode zstd gzip
    file_server
}

This one works only for the home page, not for other pages.

Can you help me please ? Thanks for your answer.

Why though?

(This is relevant)

Caddy doesn’t really care who/what the client is; if it doesn’t work when you put Traefik in front, then it’s a problem with Traefik.

Hello @matt and thanks for your answer.
The goal is to have two caddy servers or more (each one handled by his own docker service).

And I want to have an application foo running on foo.local and another one bar, running on bar.local.

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