According to Apache documentation, setting the AllowOverride
and AllowOverrideList
options to None
, will completely ignore .htaccess
files. Not even attempt to read them from the filesystem.
I have both of those options set to none
but Apache still reads the .htaccess
files. I know this because if I put a .htaccess
file in with some valid directives it throws a 500 error. Commenting out the directives (essentially an empty .htaccess
file) the 500 error is not thrown. So obviously Apache is still reading the .htaccess
files.
Apache2 error log (sanitized for public consumption):
[Thu Jul 30 23:36:35.393831 2020] [core:alert] [pid 60903] [client d.d.d.d:10554] /var/www/example/.htaccess: Require not allowed here, referer:http://example.net/
The question is why? What am I missing? How to make it behave according to the documentation? i.e. not even attempt to read the .htaccess
files.
Reference: https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride
When this directive is set to None and AllowOverrideList is set to None, .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.