This site can’t provide a secure connection

I'm using caddy for the first time and getting the above response when trying to connect by IP address.

I guess I need to set up some certificate to get past this problem, but can I specify that I don't want certificates initially?
 
You can't have HTTPS without a server certificate. Regular, self-signed or letsencrypt doesn't matter. But you have to have one that applies. And your browser needs to be able to verify it. Though you could ignore that verification check (not recommended).
 
How do I get a server certificate?
Easiest, and cheapest, is probably to use one of the many tools and get a Letsencrypt certificate. I'm using it on my VPS and home connection for various websites I run on them. Set up once, and let it automagically refresh the certificates (they're only valid for 3 months) then never be bothered again (unless the refresh failed for some reason).

I've only ever used Apache in the past and always got 'It works!' as soon as I started it up.
That's Apache's default HTTP website.
 
According to Chatgpt - I had to use that since I don't know where else to look.

Option B: With HTTPS (recommended if you have domain)

Code:
your-domain.com {
    root * /usr/local/www/nextcloud
    file_server

    php_fastcgi 127.0.0.1:9000 {
        env front_controller_active true
    }

    encode gzip
}

Caddy will automatically handle certificates.

What would I need to change for this to work on my system which is in a jail?

Would an entry for my domain in /etc/hosts be sufficient? I tried pinging it but it wouldn't resolve.
 
According to Chatgpt - I had to use that since I don't know where else to look.
I figured Certbot out manually when it first came out I think 2016; I found the Standalone option easiest (no plugins or anything else handling; webserver shuts down, Certbot deploys its own webserver and puts cert files in a folder, then restart main webserver pointing to the cert files)

I have notes here with Certbot on FreeBSD; Certbot doesn't interact with anything, but I use a script to restart nginx (similar to Certbot pre/post hooks in the conf, but I prefer not having Certbot do that by itself)
 
Also have certbot running, typically use the webroot option. But I have HAProxy terminate the SSL/TLS, added a redirect for that /.well-known/acme-challenge/ path to a locally running nginx. Added a deploy script to copy the received certificates to a directory for HAProxy and trigger a reload. Has been working for several years now. Rarely have a problem with it.
 
Back
Top