Closed michaeldhopkins closed 6 years ago
This looks more like a Caddy or Caddy-Docker question than a Cabot one to me. To be able to help, can you share your Caddyfile
maybe? Do you have a domain name with DNS A record pointed to that machine's IP address in place for letsencrypt to do its work (and not just a hacked /etc/hosts
)? What's the error that you get for visiting https://domain/ ? Have you checked Caddy logs (inside the container)?
If you're using caddy, your web container should not forward any ports publicly.
Caddy should expose ports 80 and 443, and proxy to web:5000
your caddyfile should be something like
cabot.example.com {
proxy / http://web:5000 {
header_upstream Host {host}
}
}
I'm going to close this issue, if you still can't get it working please open a new issue at https://github.com/cabotapp/docker-cabot/issues
Hi, I'm trying to get Cabot to respond to https requests on 443. I wrote up a help request on Caddy.community as well, which I'll reproduce here. Let me know what other information I can provide!
Original post:
Hi, I have Cabot using Caddy successfully running in plain HTTP on :80 and am trying to run it as HTTPS on :443.
I am using
docker-compose -f docker-compose.yml -f docker-compose-caddy.yml up -d
to bring up caddy anddocker-compose down
to take it down. Visiting https://domain instantly failed and I could see withlsof -i:443
that nothing was listening (lsof -i:80
showed Caddy was listening.) I changeddocker-compose.yml
from:to
and now I see that something is listening on :443, but I get the same failure to connect when visiting HTTPS after a long timeout.
I think I must be missing something simple. What should I try to do to get Cabot to respond to an HTTPS request? Here are my yml files, and let me know what else I should include.
docker-compose-caddy.yml:
docker-compose.yml:
lsof -i:443
docker-pr 16567 root 4u IPv6 62870 0t0 TCP *:https (LISTEN)
lost -i:80docker-pr 16530 root 4u IPv6 62825 0t0 TCP *:http (LISTEN)
lsb_release -a