Simple static file server - Https not working - http works

1. The problem I’m having:

caddy with my caddyfile without ip address produces a working site publicly, but when i add the public ip for my subdomain to the caddyfile i get this from chrome:

This site can’t provide a secure connection

71.184.243.47 sent an invalid response.

  • [Try running Windows Network Diagnostics](javascript:diagnoseErrors()).
    ERR_SSL_PROTOCOL_ERROR

doesn’t matter if i use the ip or the subdomain

2. Error messages and/or full log output:

C:\Windows\System32>curl -v https://web.axiomcrs.com:2345
*   Trying 71.184.243.47:2345...
* Connected to web.axiomcrs.com (71.184.243.47) port 2345
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.
* Closing connection
* schannel: shutting down SSL/TLS connection with web.axiomcrs.com port 2345
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

installed as a service with sc.exe

a. System environment:

Windows Server 2019

b. Command:

using caddy as a service
stop the service
modify caddyfile
caddy.exe adapt
restart the service

c. Service/unit/compose file:

n/a

d. My complete Caddy config:

{
	debug
}

71.184.243.47:2345 {
	root c:\caddy\files
	file_server {
		browse
	}
}

5. Links to relevant resources:

This is a mismatch. Caddy isn’t configured to match a domain name, and it doesn’t have a certificate for that domain, so TLS handshakes cannot succeed.

Thanks for your reply. :grinning:
Worked with the subdomain and not with the ip in the caddyfile and the curl.

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