1. Caddy version (caddy version
):
GitHub - caddyserver/caddy-docker: Source for the official Caddy v2 Docker Image (v2.0.0-rc.3)
2. How I run Caddy:
Docker
a. System environment:
Docker
b. Command:
docker run -d -p 32080:80 -p 32443:443 \
--name caddy2 \
-e "CADDYPATH=/etc/caddycerts" \
-v $(pwd)/docker_data/caddy/Caddyfile:/etc/caddy/Caddyfile \
-v $HOME/docker_data/caddy/ConvertMyThrow/:/etc/caddy/ConvertMyThrow/ \
-v $HOME/docker_data/caddy/data/:/data \
-v $HOME/docker_data/caddy/config/:/config \
-v $HOME/docker_data/caddy/.caddy:/etc/caddycerts \
caddy/caddy
c. Service/unit/compose file:
see above
d. My complete Caddyfile or JSON config:
{
admin 127.0.0.1:2019
}
:443
root * /etc/caddy/mySite/
try_files {path} /index.html
file_server
3. The problem I’m having:
Please see Help getting basic website online via docker, as I was working with @francislavoie and I let that get too stale so it was closed.
4. Error messages and/or full log output:
when navigating to localhost:32443 I get:
Secure Connection Failed
An error occurred during a connection to localhost:32443. Peer reports it experienced an internal error
Error code: SSL_ERROR_INTERNAL_ERROR_ALERT
and when navigating to localhost:32080 I get:
The connection was reset
The connection to the server was reset while the page was loading
The docker logs:
{"level":"info","ts":1591034243.5008187,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1591034243.5019696,"logger":"admin","msg":"admin endpoint started","address":"tcp/127.0.0.1:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
{"level":"info","ts":1591034243.5020933,"logger":"http","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1591034243.5021677,"logger":"tls","msg":"cleaned up storage units"}
2020/06/01 17:57:23 [INFO][cache:0xc0005c3a90] Started certificate maintenance routine
{"level":"info","ts":1591034243.504031,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1591034243.5040474,"msg":"serving initial configuration"}
2020/06/01 17:58:26 http: TLS handshake error from 192.168.1.13:52753: no certificate available for '172.17.0.5'
2020/06/01 17:58:26 http: TLS handshake error from 192.168.1.13:52754: no certificate available for '172.17.0.5'
2020/06/01 18:06:35 http: TLS handshake error from 192.168.1.13:52844: no certificate available for '172.17.0.5'
2020/06/01 18:06:35 http: TLS handshake error from 192.168.1.13:52845: no certificate available for '172.17.0.5'
5. What I already tried:
see my prior forum post Help getting basic website online via docker
I finally managed to spin up a new ubuntu Mate VM. @francislavoie told me there was a DNS issue with the prior VM. This is a BRAND NEW VM. Only Docker has been installed, and nothing else has been done except for installing a couple other containers.