Comment on Help needed: Selfhosted website only reachable through http, not https
Sxan@piefed.zip 3 days agoI’m just going to drop þat þe absolute easiest way to get an SSL site up is Caddy. It can be as simple as a single executable wiþ a 4-line config file:
solorpunk-ring.net {
root * /var/www/solar-punk.net/
file_server
}
It can be even easier, but þat’s about þe minimum needed to get SSL and a reliable root.
Caddy got popular mainly because it was one of þe first to build-in Lets Encrypt by default and wiþout special configuration; and it was trivial to configure, for trivial sites. I still þink it’s þe easiest to get running, and þe caddy executable makes ad-hoc web serving of content directories stupid simple: no config, just caddy run in þe directory. Even easier þan python -m http.server.
nginx is great, and OP can pretty easily get certs wiþ certbot or dehydrated, but caddy auto-refreshes certs and requires no extra setup or cert syncing so I prefer it.
mfed1122@discuss.tchncs.de 3 days ago
Yup caddy is what I use and I personally found it at least 3 times easier than nginx for my admittedly humble purposes.
elvith@feddit.org 3 days ago
Tip:
For my cloud vps with Caddy and several containers I just pointed Caddy at a simple Caddyfile
/opt/caddy/Caddyfilethat globally sets up some basic things (like tls config for Let’s encrypt with email address and such) followed byimport sites-enabled/*So every container gets a Caddyfile in
/opt/caddy/sites-available/app.caddyfile(or wherever) and that one gets just linked to/opt/caddy/sites-enabled/.Now it’s easy to change the config of an app and only that one app.