1. The problem I’m having:
I have Caddy working with auto SSL support (Let’s Encrypt) for my external domain without problems.
But I also want to be able to access the server on the local network with its local network name.
When I used Apache (with a paid cert), this worked. The browser just gave me a warning NET::ERR_CERT_COMMON_NAME_INVALID and let me continue to the page.
With Caddy, I get an error ERR_SSL_PROTOCOL_ERROR and the browser does not let me visit the page.
2. Error messages and/or full log output:
curl -vL https://backend/mypath/
* Host backend:443 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1, 192.168.0.7
* Trying [::1]:443...
* Connected to backend (::1) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS alert, internal error (592):
* OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error
* Closing connection
curl: (35) OpenSSL/3.0.13: error:0A000438:SSL routines::tlsv1 alert internal error
3. Caddy version:
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
4. How I installed and ran Caddy:
docker compose
a. System environment:
Docker.
b. Command:
docker compose
c. Service/unit/compose file:
Nothing related to this error in the docker-compose file.
d. My complete Caddy config:
{
order webdav before file_server
order cgi before handle_path
order cgi before respond
}
externaldomain.com:443 {
handle_path /mypath* {
root * /mypath
file_server browse
}
}
Nothing in the Caddy log for this error.
I also tried:
externaldomain.com:443, backend:443 {
handle_path /mypath* {
root * /mypath
file_server browse
}
}
Which of course resulted in auto SSL errors in the Caddy log (because it could not request a domain for “backend”) and also did not work.
Instead adding http://backend:80 is working. But I did not want to use HTTP 80, if possible.
Thanks!