upvote
Apache has a feature that no other http server has replicated: .htaccess files.

They provide limited configurability of server functionality within a webroot. That's extremely convenient for PHP webapps. For many PHP apps, deploying them on anything that is not apache means touching the server config itself.

reply
I would say that's actually a misfeature as it requires too many additional filesystem lookups to fulfil requests.

Modifying the web server config is a nonissue outside of shared hosting, which should have died out with the advent of VMs/containers.

reply
> … too many additional filesystem lookups …

Caching is a thing. Only dump the cache when a changed is noticed.

reply
And now you have 2 problems..
reply
Does not Microsoft's IIS also have that with web.config files?
reply
Yes, but then you're dealing with IIS and why would you want that?
reply
Eh. You can use .htaccess in nginx too. I use that everyday.
reply
Ah yes, htaccess. Another lovely source of security bugs for the past 30 years and may it continue to bear skiddie fruit for another 300.

Its model is fundamentally flawed precisely because it was based on the fundamentally flawed PHP model (website assets and code are stored and hosted from the same webroot). This allowed for shared hosting to exist but containers and reverse proxies are a far better way of organising such sites today.

The fact that in other webservers the server's configuration is configured through its configuration file and not the content of its webroot is a feature.

reply
Yes apache has a config file too amazingly enough, .htaccess is optional
reply
The point I was making is that having alternative sources of configuration (coming from the contents being served no less) is a misfeature.

Really not sure how one could possibly read my comment as me saying htaccess is the only way of configuring Apache?

reply
PHP can go to hell. My hair is gray because of it. Nginx is superior, and I can get anything imaginable done with config files. And not to mention, it's much faster.
reply
The http servers drag race finished 15 years ago on a tie, it's really much a matter of taste and familiarity more than performance at this point.
reply
The lazy bastard in me prefers Caddy.
reply
I don't understand this. NGINX can run PHP. PHP is not exclusive to Apache.
reply
In general, the Apache php mod has had less drama than php-fpm over the years. Also, casting each domain under specific isolated itk server user(s) account(s) adds a layer of containment, where Nginx processes must run under a single user context.

Nginx uses way less memory in most use-cases (1/4 to 1/10), but with dynamic content like php it is only slightly better (maybe 15% if lucky). Also, setting up websocket proxy in Nginx is still a bit of a bodge.

Each server type has its own trade offs, and a list of known mitigations the uninitiated must learn. If you have a single domain high-traffic site with static media files, than Nginx is probably going to matter more. =3

reply
Apache has plenty of life left, it just works™, supports almost everything, and currently is about as efficient as nginx WRT connection handling. Sometimes you want what .htacces gives you. (No built-in Lua though.)
reply
i mostly use nginx lua to patch on some feature i had even on bare Apache, let alone all the core modules.
reply
At least 21% of web sites use Apache httpd, and of course many sites don’t report the software used at all. Nginx is also frequently used as a reverse proxy, with Apache used behind it.
reply
My whole selfhosted mess is built around Apache. It was what I started with and I haven't run into any edge cases that it can't cover.
reply
Exactly the same for me! I could switch to Nginx, it's one prompt away probably, but why?
reply
Why would I not use apache if everything already works with it for me?
reply
Apache has mod_md -- an acme client, which lets you obtain https certificates as easily as on caddy, without integrating with awkward separate programs.

https://httpd.apache.org/docs/trunk/mod/mod_md.html

reply
reply
There is a 7 year difference between those release announcements. Personally I've never liked nginx because of their attempts at monetising it, a lot of features are behind nginx plus which is really expensive and full of sales staff who try to reach out all the time, and when you start it, it says something along the lines of "Starting a high performance webserver" which always seemed strange
reply
At work we use Apache because of mod_shib. We have yet to try nginx-http-shibboleth.
reply
One should stop using SAML anyway as that has its own collection of problems. We learned a lot about problems with cryptographic protocols in the last 30 years that cannot be fixed in SAML.
reply
Default Wordpress docker image uses it.
reply
I am the same way. I use Caddy if I can. But I have a lot of docker containers running apache and nginx. You probably might too.
reply