1. My Caddy version (caddy C -version
):
(devel) [2.0 beta 9]
2. How I run Caddy:
a. System environment:
DigitalOcean VPS running Ubuntu 18.10 with open incoming ports 80 and 443
go version go1.13.4 linux/amd64
b. Command:
bill@Bill2:~/www$ sudo caddy file-server --listen wtrenker.com:443
[sudo] password for bill:
2019/11/15 15:06:31.061 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["localhost:2019"]}
2019/11/15 15:06:31 [INFO][cache:0xc0000a5450] Started certificate maintenance routine
2019/11/15 15:06:31.064 INFO tls cleaned up storage units
2019/11/15 15:06:31 Caddy 2 serving static files on wtrenker.com:443
c. Service/unit/compose file:
(I’m not sure what exactly to put here.) I am currently starting Caddy manually while I check it out. I am very interested in using Caddy to front-end my small web application with HTTPS. The only thing I’m missing from Caddy is a built-in WSGI interface for back-end access, but I can work around that with some extra programming (in python; I’m at the very beginning of my Go learning curve.)
d. My complete Caddyfile:
I'm not using a Caddyfile yet, this is all simple command-line input.
3. The problem I’m having:
I installed Go and Caddy in test directories 2 days ago and it worked flawlessly. The automatic HTTPS is amazing! Since everything looked good I uninstalled Go and Caddy (deleted their directories) and re-installed them in clean production directories. Since then when I try to access the Caddy file-server I cannot get my web pages, just the security error described below.
So It looks like I have deleted my certificates on the server end by reinstalling Caddy in a new directory. (That’s just a guess but I’m quite sure the problem is my own doing.) If that is the case how do I sort out the certificates?
Also, I’ve tried this out on other clients (Firefox, Edge and Android Chrome on my phone) and I get related errors.
Then, as a stab in the dark, I entered this into my browser: wtrenker.com:443, and to my great surprise, I get my test web pages. although they are not secure (no HTTPS). Something is very strange.
4. Error messages and/or full log output:
On the browser (Chrome Version 78.0.3904.97) I get this message:
This site can’t provide a secure connection
wtrenker.com sent an invalid response.
- [Try running Windows Network Diagnostics](javascript:diagnoseErrors()).
ERR_SSL_PROTOCOL_ERROR
(The Windows Network Diagnostics couldn’t identify the problem.)
Here is a log entry when I put wtrenker.com:443 into the browser:
2019/11/15 16:19:19.002 INFO http.log.access handled request {"request": {"method": "GET", "uri": "/", "proto": "HTTP/1.1", "remote_addr": "23.16.240.22:49474", "host": "wtrenker.com:443", "headers": {"Upgrade-Insecure-Requests": ["1"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Accept-Language": ["en-US,en;q=0.5"], "Accept-Encoding": ["gzip, deflate"], "Connection": ["keep-alive"]}}, "common_log": "23.16.240.22 - - [15/Nov/2019:16:19:19 +0000] \"GET / HTTP/1.1\" 200 122", "latency": 0.000120121, "size": 122, "status": 200, "resp_headers": {"Etag": ["\"q0z1xo3e\""], "Content-Type": ["text/html; charset=utf-8"], "Last-Modified": ["Thu, 14 Nov 2019 18:27:24 GMT"], "Accept-Ranges": ["bytes"], "Content-Length": ["122"], "Server": ["Caddy"]}}
5. What I already tried:
I have rebooted the client machine, a Windows laptop also running ssh access to the VPS. And I have rebooted the VPS, several times. I have made sure there are no other processes on the VPS that are listening on ports 80 and 443.
6. Links to relevant resources:
I have done quite a bit of research on Google and I have looked through this forum. I have found some related info but nothing that steers me in the right direction.
Thanks in advance for any help you can provide. Bill