Using own SSL certificates in reverse proxying

1. Caddy version (caddy version):

v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=

2. How I run Caddy:

from a CMD window in Win10

a. System environment:

windows 10

b. Command:

caddy start

c. Service/unit/compose file:

n/a

d. My complete Caddyfile or JSON config:

mywebsite.com

reverse_proxy 127.0.0.1:18080

3. The problem I’m having:

I would like to use an SSL certificate and key which I already have, instead of automatic HTTPS - but I have no idea how to do this. Imagine certificate/key files are mywebsite.crt / mywebsite.rsa, what would I have to write in the Caddyfile?

4. Error messages and/or full log output:

n/a

5. What I already tried:

I read the docs and I could not find a solution for this case

6. Links to relevant resources:

It’s right here in the docs:

Thank you Francis! with regards to my initial problem, this Caddyfile worked for me:

mywebsite.com
tls mywebsite.crt mywebsite.rsa
reverse_proxy 127.0.0.1:88

I really like the minimalism of Caddy config files!

3 Likes

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