Why is nginx preferred over Apache these days? I believe nginx was originally preferred because Apache had scaling issues with its original forking concurrency model, but that was replaced a long time ago, so…why use nginx today?
Programming
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
That's why I'm entertaining the idea of an alternative in this post. Although it seems there are a lot of mixed opinions on this matter
Apache's httpd still comes to this day preconfigured to use the awful prefork config or of the box on Ubuntu, CentOS, debían etc. A lot of people literally don't even know that there's another option but they do know that nginx is far better than prefork.
That asside, there's also still pros and cons for both nginx and mpm_event. So to simply say "why use nginx apache also has event driven server configs now" is pretty naive because it's not like one is just inherently better than the other at everything.
I don't know about Caddy, but if they aren't using Varnish or similar they should consider it. A caching server can be helpful for frequently repeating fairly stable parts of websites and has a fairly significant performance benefit.
I toyed around with Caddy on my homelab for a bit but I ended back on nginx. Performance was not noticeably different and I really didn't like the Caddyfile syntax.