https://news.netcraft.com/archives/category/web-server-surve...
Netcraft confirms it. :-)
Whereas with Apache2, PHP/Python/etc. interpreters can run directly in the Apache worker processes. Similarly, you can also run Nodejs/Ruby/Python web application as part of Apache with Passenger module.
nginx is good at serving dynamic content too. Simple setup with uwsgi for Python and php-fpm for PHP.
For me, the main draw to nginx was powerful (web) proxying, static file performance and simpler configs - Caddy does all of that 10x. In a sense, nginx is right in between Apache and Caddy, so unless I need to proxy something obscure like RTMP or email, I rarely have a use for it these days.
HTTP is not new technology, nor rocket science, a web server to serve a simple HTML page should be configurable from scratch, from an empty .conf file, in seconds.
Caddy seems to share the same philosophy.
> Considering nginx is really just good at serving static content...
That's not correct at all. Regardless of how the request handled, serving dynamic content on nginx is trivial.
Taking this logic to the extreme, socat is also very good at serving dynamic content:
$ socat TCP-LISTEN:80,fork,reuseaddr TCP:127.0.0.1:8080 # Make sure Gunicorn is running on port 8080 to handle incoming requestsThe English is a bit broken in the top-level comment, but both static content and proxying are clearly mentioned as "nginx things", which is entirely fair. If you don't consider proxying to be included under the term "serving" (which is entirely reasonable and not uncommon) this is entirely true - the only kind of "serving" nginx is good at is static files, the rest of what it's good at isn't "serving" but proxying to other servers that render dynamic content - PHP-FPM is one such server (it just happens to not speak standard HTTP).
I don't see why people always get mad when this gets brought up - I've always considered that to be a good architectural choice for nginx. Running application code in the webserver process isn't a good idea anymore so the focus on good static and proxy performance is actually what I think made it ultimately "win" over Apache - the industry has moved on from the old ways and Apache fell behind.
Additionally, if you are behind CDN or just plain Varnish, static assets would only be hit once or twice, and majority of the requests would be processed by PHP anyways, so there is no benefit in putting additional pipe between proxy (Nginx) and PHP interpreter (FPM). Especially with smaller page responses, Apache can easily win, since it doesn't have to communicate with an external process.
This is basically what CloudFlare Workers does already.