Currently, I only have www.rupel.org active as a site. I have not activated plex.rupel.org but I included it in the Caddyfile below for help. See item 3.
I am looking at having two sites and want to use my own certificate from a CA that covers the two sites (SAN cert). If my cert covers both sites, how do i get caddy to use it on both if it were not a wildcard?
There are quite a few ways to accomplish that, but I would argue the most straight forward is specifying your certificate multiple times (or via snippets).
Might be a bit redundant, but it’s way more declarative.
For that, you would either need to add something like
where cert.pem and key.pem are paths on your file system.
Edit after this thread has been solved: I overlooked that you already had tls /home/.. in your first block. Sorry^^
The following is redundant, then, I guess.
For example, somewhere like /etc/caddy/cert.pem and /etc/caddy/key.pem or in /etc/ssl or /var/lib/caddy or whatever. You get the idea
I already have the tls cert in the first one I was just not sure about having it be used on the second site (plex.rupel.org). I did not know if you had to add the tls to each site or you add it once outside of the brackets.
I attempted to use these and both attempts failed. FYI I am going through Cloudflare as DNS proxy. So, when comment out one of the sites, it works fine. If I have both sites enabled, it does not work.
Update: I tried to do it again with both active and I removed Cloudflare out of the picture. No go. As soon as i commented out one of the site it worked instantly.
Instead of separating the two sites like I did above, I decided to just use a wildcard site and then use the handle and host matchers to distinguish my plex.rupel.org service from my normal www.rupel.org.