TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Caddy – a modern web server (vs. Nginx)

62 pointsby n1tryover 8 years ago

11 comments

kmeadeover 8 years ago
Shortcomings of the article aside, I&#x27;d like to say that I use Caddy for a set of small websites and I couldn&#x27;t really be happier with it.<p>I&#x27;m a longtime Windows developer who doesn&#x27;t have much patience with nerdy complexities. I started in 1996 with a buggy, gawd-awful Netscape webserver, moved to the late-lamented O&#x27;Reilly WebSite (even had a T-Shirt) and reluctantly settled on MS IIS, with occasional Apache encounters. Caddy has been an absolute breath of fresh air.<p>I currently run 4 sites from a system at my home, using Namecheap dynamic DNS. Caddy serves the basic web pages and static content and also reverse proxies to an internal Python server for dynamic content. Sounds a little complicated, but believe me, configuration is dead-simple thanks to Caddy. Plus I get full HTTPS from Let&#x27;s Encrypt for the cost of supplying my email address and agreeing to a EULA - no configuration needed at all.<p>I&#x27;ve never used a webserver that was easier to configure or had such low resource requirements.
评论 #13359596 未加载
VT_Drewover 8 years ago
&gt;The configuration is not that intuitive and you really need to get into the syntax and concepts to get an understanding of knobs to turn in order to achieve a certain goal.<p>Personally I found Nginx configuration much simpler than Apache. I think Nginx is pretty intuitive, it certainly is much supplier than IIS, which is a nightmare.
notacowardover 8 years ago
&gt; every middleware you want to use needs to be included into the binary and if it’s not, you need to re-compile the program<p>Having to recompile to add functionality that alternatives provide as dynamically loaded plugins is insane. This is 2017. Linux has had loadable <i>kernel</i> modules since 1995, and I worked on them for other versions of UNIX as far back as 1991. I understand that it&#x27;s hard for a Go program to support plugins written in other languages using a more conventional runtime. No problem there. However, there&#x27;s just no excuse for relying on recompilation instead of dynamically loading modules also written in Go and thus using the same runtime. I really want to like Go, but as long as the Go community clings to long-discredited ideas regarding things like packaging and distribution and symbol versioning I just don&#x27;t feel like I can depend on it to build infrastructure that will remain robust over time.
评论 #13358501 未加载
评论 #13358052 未加载
评论 #13361476 未加载
评论 #13358063 未加载
评论 #13358442 未加载
mwpmaybeover 8 years ago
I&#x27;ve been experimenting with Caddy over the past few days and it&#x27;s great, if somewhat immature and quirky. The plugin ecosystem is rich but in dire need of some oversight and QC. What I like most about Caddy is its very sane behavior out of the box: it just does the right thing in most cases, and requires much less configuration than NGINX, Apache, HAProxy, etc. (It also has fewer features, so there&#x27;s a trade-off.)<p>I posted a gist[0] with my Caddy+Varnish+PHP-FPM configuration and a README explaining the hows and whys. I&#x27;m moving a bunch of WordPress sites from Apache&#x2F;mod_php to this configuration (each site&#x27;s PHP-FPM instance is Dockerized, but that&#x27;s out of the scope of the gist). Hopefully someone finds it helpful!<p>0. <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;mwpastore&#x2F;f42f6f1309a7b067519f4c08e18b0b6a" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;mwpastore&#x2F;f42f6f1309a7b067519f4c08e1...</a>
tannhaeuserover 8 years ago
I like caddy, but the dreamhost benchmark re apache vs nginx isn&#x27;t really telling, as it doesn&#x27;t mention fundamental apache config properties. I&#x27;m assuming they were benchmarking an unoptimized MPM&#x2F;prefork setup, but you can use event-based request processing (and other process models) with apache as well. There&#x27;s nothing magical with nginx.<p>I&#x27;d also like to see a benchmark vs. H2O which seems to have the most advanced HTTP&#x2F;2 support right now (its running the nghttp2 web site for some time now).
评论 #13358083 未加载
popey456963over 8 years ago
Some of your links to <a href="https:&#x2F;&#x2F;caddyserver.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;caddyserver.com&#x2F;</a> are relative and not absolute, leading me to <a href="https:&#x2F;&#x2F;ferdinand-muetsch.de&#x2F;caddyserver.com" rel="nofollow">https:&#x2F;&#x2F;ferdinand-muetsch.de&#x2F;caddyserver.com</a> - Something you should consider fixing.<p>All in all however, I like the look of Caddy. The best bit I feel has been left out though:<p>&quot;That is why, effective this release, Caddy will automatically serve all live sites over HTTPS without user intervention.&quot;<p>Which I think is just brilliant.
评论 #13357761 未加载
notheguyouthinkover 8 years ago
&gt; You don’t need to run any script. You don’t even need to create a Let’s Encrypt account or install the certbot.<p>How is this done? Ie, to not need any account and still get new&#x2F;valid certs.<p>And, on that note, what is the difference between having an account and not? Eg, how might using no accounts harm a production environment?<p>Just trying to wrap my head around that. Really cool UX for side stuff!<p><i></i>edit<i></i>: Ah, looks like there is an account involved - it creates one, possibly using your email address. This makes more sense now.
评论 #13357767 未加载
joshstrangeover 8 years ago
I like caddy and I use in inside of docker for my private home&#x2F;cloud setup but lately I&#x27;ve been rethinking even that. I agree it&#x27;s almost magical in how easy it is to setup (especially with HTTPS) but I use nginx for serious projects and a large part of me says it&#x27;s better to use the same thing everywhere to keep me up to date and aware of potential issues or features and not mix the two.
richardwhiukover 8 years ago
The graph is marked as &#x27;Apache2 vs. nginx memory usage &#x27; but that&#x27;s not what it shows at all - it&#x27;s &#x27;Requests per second on Apachev2 vs nginx&#x27; - did you mean to show <a href="https:&#x2F;&#x2F;objects-us-west-1.dream.io&#x2F;kbimages&#x2F;images&#x2F;Webserver_memory_graph.jpg" rel="nofollow">https:&#x2F;&#x2F;objects-us-west-1.dream.io&#x2F;kbimages&#x2F;images&#x2F;Webserver...</a> instead?
评论 #13357839 未加载
评论 #13357837 未加载
dslover 8 years ago
This looks awesome. I&#x27;d switch away in a heartbeat if the Let&#x27;s Encrypt integration could handle multi-server deployments.
spilkover 8 years ago
Does Caddy support client certificates?
评论 #13360365 未加载