-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Caddy as a server type #60
Comments
Can't say I'm familiar with Caddy. First thing would be an overview of what we'd be dealing with/looking at. |
Works similarly to nginx, but has a ton of unique features not available (without extensions) in nginx like automatic SSL (gets an SSL cert from Let's Encrypt on the fly on server startup), etc. A simple Caddyfile for a PHP site is (usually) as simple as: https://{{hostname}} {
root /var/www/web
fastcgi / 127.0.0.1:9000 php
rewrite {
to {path} {path}/ /index.php?{query}
}
} Uses php-fpm with the See https://hub.docker.com/r/abiosoft/caddy/ for a container built from source (must be built from source, because the pre-built binaries require a license if used commercially) |
The automatic HTTPS bit will probably cause issues with Nanobox, actually, but we can explicitly disable that pretty simply in the config template we would create for this. In production, SSL is terminated at the load balancer, not the web server, so Caddy wouldn't ever actually see a request to 443. What else sets it apart if we disable the auto SSL? I think we can definitely add it to our list of things to support, but it would be nice to be able to give users some guidance on when to use which server, and what restrictions the Nanobox design will place on the actual features they'll be able to take advantage of. |
Check https://caddyserver.com/features for a pretty comprehensive list. Caddy can be used as a load balancer itself, which can terminate SSL and automatically renew, if that would work in the stack. Disclaimer: I don't actually use nanobox, just saw it via Hacktoberfest and thought I'd bring this up as a potential addition because Caddy is feeling like the #3 webserver these days. I use it in most of my projects because of its ease of use and features that simplify lots of the usually complicated server tasks (e.g. SSL). |
It certainly looks nice. We use Go in a lot of our own stack, in fact, including for the CLI client. Our load balancer/SSL terminator/router is kernel-level, IIRC, and configured on the fly via API, so it's very fast and handles changes in app infrastructure very cleanly on the fly. So I don't think we'd want to switch to Caddy on that level. That said, it certainly looks like something to support for app-level use! Thanks for bringing it up! |
I can help with the implementation or any questions, but I'm not sure where to start
The text was updated successfully, but these errors were encountered: