Using both Caddy and Nginx?

We love using Caddy on our servers and does the job really well, especially on the SSL side which was the main reason we choose Caddy. However, our devops provider Cloud66 has introdouced lots of exciting features that works only with Nginx, security ones are the most important for us and they don’t support Caddy / can’t make them work with it.

We want to keep using Caddy but is there a way to make it work together with Nginx? Like first layer to be Caddy and next one Ngingx, like a reverse proxy? Like Caddy to handle the SSL and pass everything else to nginx?

Yep. Just make sure to have Nginx listen on some other port like 8080 or something, instead of 80/443, so that Caddy can use those ports, which are necessary to properly solve the ACME HTTP and TLS-ALPN challenges, to get certificates issued automatically.

Then use the reverse_proxy directive to send requests through to Nginx instead of Caddy.

What are these “features”? It’s likely Caddy can probably do the same thing.

Next time, please fill out the help topic template. It’s important so that we’re all on the same page as to how you installed Caddy, what version you’re using, what features you’re using, etc.

4 Likes

Thanks. It’s not that Caddy doesn’t support it, but they are automatically editing the nginx file and use custom variables in it, so if we change a setting on their UI they update the nginx.conf .We could do this manually with Caddy, but there will be to much work on our side just to keep things in sync.

That’s funky. I’m sorry to hear :frowning:

1 Like

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