Hacker News new | ask | show | jobs
by account42 22 days ago
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.

5 comments

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

Its use is optional: set "AllowOverride None" (the default) and it's disabled.

* https://httpd.apache.org/docs/2.4/mod/core.html#allowoverrid...

But then that removes the "feature Apache has that no other webserver does" and brings back GGP's point about "what does Apache offer over other webservers like nginx"
> But then that removes the "feature Apache has that no other webserver does" […]

Disabling the feature does not remove it.

If I do not turn on my car's windshield wipers, do they get "removed"?

But, if we concede that it's a misfeature (and that it's not valid to criticize the project for having it, as it can be disabled), then what advantage is there in having it?

You can't have it both ways. Either it's a misfeature but it 'doesn't matter' because it can be disabled, or its a legitimate feature in which case you must therefore defend the existence and purpose of the feature.

When you need (or want) it, you turn it on and accept a few more filesystem look ups, in exchange for convenience and not having to edit the main config.

When you don't need it, great, you've got slightly better performance.

> But, if we concede that it's a misfeature […]

Why would this be conceded?

> Either it's a misfeature but it 'doesn't matter' because it can be disabled, or its a legitimate feature in which case you must therefore defend the existence and purpose of the feature.

Just because I don't (currently) use it doesn't preclude someone else from doing so, and if that someone else wants to explain their use-case that's their prerogative.

But you can selectively use the option: allowing the feature where it is useful (user web dirs perhaps, or individual dirs even more selectively) and disabling it elsewhere.
> … too many additional filesystem lookups …

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

And now you have 2 problems..
I believe the OS actually caches it, and since you only modify it by interacting with the OS, the cache gets invalidated when needed.
Network filesystems, consequences of mount shadowing, crazy access control extensions, etc.. Trying to recursively monitor directories with a htaccess file in them to know if a URL requested will reach one.. It is a typical layered system problem.
Webserver/filesystem management, cache invalidation, and off-by-one errors.
Your forgot naming things :)
ok, five problems
what about ~/public_html dirs on shared servers? Having the ability to have .htaccess there means users can impose access control without being able to modify the server config (which they shouldn't be able to do!).
Why shared hosting should die? It's still the cheapest way to publish a dynamic website.
Shared hosting was and still is a great idea, IMHO it just should be limited to static files, not running server-side webapps.