by kodfodrasz · 9y ago · 0 comments
I'm really iterested on the whys (in addition to the obvious legacy reasons).
Besides Apache and nginx, there aren't really any servers I'd trust for production use. Conceptually, I really like what Caddy is doing, but it's simply too young, not to mention the concerns that came up when Let's Encrypt had an outage back in May: https://github.com/mholt/caddy/issues/1680
1) Caddy has the most robust OCSP implementation of any web server. It caches staples locally and refreshes them halfway through the validity period so it can endure days-long OCSP responder outages.
2) Even if a certificate needs to be renewed while the ACME server is down, Caddy can endure 2-to-3-week-long outages of the ACME server because it renews 30 days out from expiration and tries twice per day until it succeeds, logging its actions along the way.
And because Caddy is written in Go, memory leaks like what Apache suffers are much less likely, if not impossible.
(Source: I implemented it.)
Two calls to OpenSSL and a few lines of shell script will fetch staples from LE whenever I want (ie more often than your defaults that have caused problems before) for HAProxy to serve. How's that for robust.
>2)...
great so you're as reliable as.. any other LE client that tries to renew before expiry, but without the ability to choose when to renew certs?
2) Ours is the only LE client built directly into the web server, so "reliability" isn't really a comparable factor. By doing renewals automatically, Caddy's HTTPS implementation is more reliable and robust than doing it manually.
https://news.netcraft.com/archives/2017/07/20/july-2017-web-...
There are lots of legit reasons to run Apache:
- it works like a champ
- it's widely known
- it's got a big ecosystem (plugins, etc.)
- it has a fairly complete WebDAV implementation
- it's widely supported
TL;DR "legacy" sometimes means "good" and not just "old."
In this case legacy is either "I don't know anything else", "well it worked so far" or "meh".
WordPress, for example. It can run on other servers, but their own docs call out the issue..."Since Nginx does not have .htaccess-type capability and WordPress cannot automatically modify the server configuration for you, it cannot generate the rewrite rules for you"
"With Nginx there is no directory-level configuration file like Apache's .htaccess or IIS's web.config files. All configuration has to be done at the server level by an administrator, and WordPress cannot modify the configuration, like it can with Apache or IIS"
What you are saying is, on it's own, true. It's also a solved problem for WP.
Its "killer feature" are htaccess files. It provides a possibility to give users a limited way to configure their virtual hosts, without giving them too much power. (Unfortunately there are some unfixed systemic security issues with that, namely symlink attacks...)
Apache httpd in many ways is a much more complete web server solution compared to, say, nginx (which I like as well). I'm prefering Apache httpd for the depth of available documentation alone, because everything is developed openly, C source is accessible and not hard to develop with, and because of the breadth of available options (certbot/letsencrypt/acme reference implementation on Apache, WebDAV, clustering etc. etc.).
As far as stats go, according to netcraft MS's IIS is leading with Apache second and nginx a distant third. Of course, this data isn't terribly reliable as netcraft can only see front ends, which may hide whats behind the load balancer, but IIS/Apache are still kings.
(And I'm writing this as a dev who worked on a competing web server which IM-biased-O was vastly better :)
Mostly I use it because, after probably 20 years or so, I'm quite comfortable with and accustomed to it.
That said, I have started putting a few of my own web sites on nginx just to try it out a bit and get some familiarity with it.
What your vendor supports and what you are most comfortable with configuring should decide which one you run.
PHP, as you say, is something else entirely. It's so much slower than your http server so the latter doesn't matter at all.
It's kept up to date and it works for everything I want it to work with. This idea that because it's old and not hip therefore it's use is questionable is kinda dumb. I was disappointed when OBSD wrote their own httpd that was initially filled with stupid bugs.
If it ain't broke don't fix it.