From cd4a062e908efe76e11c7e562af7c19663337632 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 20 Apr 2021 11:27:17 +0200 Subject: [PATCH] fix ssl certificate generation --- docker/caddy/Caddyfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docker/caddy/Caddyfile b/docker/caddy/Caddyfile index 8659bf1c..79eddda9 100644 --- a/docker/caddy/Caddyfile +++ b/docker/caddy/Caddyfile @@ -1,3 +1,15 @@ +# This block below is optional if you want to generate internal certificate for the server ip address. +# It is useful in case you have services trying to reach the server through ip and not domain like health checks. +# It will generate internal certificate so browsers will warn you when connecting but that not a problem. + +:443 { + tls internal { + on_demand + } + + reverse_proxy nginx:80 +} + # Make sure you have DOMAIN_NAME specified in .env file ie. siasky.net, you need it to fetch correct certificates. # DOMAIN_NAME_ALIAS is optional, in case you run multiple servers under the same domain like we do for siasky.net # then you might want to use it for something server specific that would let you connect to this specific server @@ -22,15 +34,3 @@ reverse_proxy nginx:80 } - -# This block below is optional if you want to generate internal certificate for the server ip address. -# It is useful in case you have services trying to reach the server through ip and not domain like health checks. -# It will generate internal certificate so browsers will warn you when connecting but that not a problem. - -:443 { - tls internal { - on_demand - } - - reverse_proxy nginx:80 -}