{"id":1107,"date":"2025-01-14T12:59:34","date_gmt":"2025-01-14T12:59:34","guid":{"rendered":"https:\/\/thomas.w-p.me.uk\/blog\/?p=1107"},"modified":"2025-01-14T12:59:34","modified_gmt":"2025-01-14T12:59:34","slug":"caddy-sec_error_unknown_issuer-and-tls-internal","status":"publish","type":"post","link":"https:\/\/thomas.w-p.me.uk\/blog\/2025\/01\/caddy-sec_error_unknown_issuer-and-tls-internal\/","title":{"rendered":"Caddy, SEC_ERROR_UNKNOWN_ISSUER and TLS Internal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I have solved this before but forgot how. Maybe typing something will help me remember the next time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I use Caddy in a docker container to reverse proxy around my docker box and other computers in my network. Something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># test subdomain\ntest.mydomain.net {\n\n        reverse_proxy http:\/\/10.10.10.15:8010\n        tls internal\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It always gives SEC_ERROR_UNKNOWN_ISSUER error and I can just accept this, which works for a while. Ideally you want it to just work, especially if you are setting up a site your 83 year old mum might access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>I had forgotten that if you want it to work, you need to add the subdomain to your DNS as an A record &#8211; and then remove TLS internal. Job done.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This does mean that anyone can hit that domain &#8211; which is fine in some cases and not fine in others. So I updated the internal only domains to this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fileserver.mydomain.net {\n\n        @denied not client_ip 10.10.10.0\/16 172.26.0.0\/12\n\n        handle @denied {\n                 abort\n        }\n\n        reverse_proxy http:\/\/10.10.10.15:8081\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The 172.26 address comes from docker and I think it fails without it from memory.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have solved this before but forgot how. Maybe typing something will help me remember the next time. I use Caddy in a docker container to reverse proxy around my docker box and other computers in my network. Something like this: It always gives SEC_ERROR_UNKNOWN_ISSUER error and I can just accept this, which works for &hellip; <a href=\"https:\/\/thomas.w-p.me.uk\/blog\/2025\/01\/caddy-sec_error_unknown_issuer-and-tls-internal\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Caddy, SEC_ERROR_UNKNOWN_ISSUER and TLS Internal<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113,110],"tags":[],"class_list":["post-1107","post","type-post","status-publish","format-standard","hentry","category-caddy","category-docker"],"_links":{"self":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=1107"}],"version-history":[{"count":1,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1107\/revisions"}],"predecessor-version":[{"id":1108,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1107\/revisions\/1108"}],"wp:attachment":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=1107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=1107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=1107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}