.htaccess error "not allowed here" for all for all instructions

Solution 1:

You will require a minimum of AllowOverride Authconfig FileInfo Options inside your <Directory> block to get the .htaccess you've posted here to work - mod_rewrite will require FileInfo Options and your <FilesMatch> block requires the Authconfig.

Also: your statement "does not work with AllowOverride All" is mistaken. You cannot specify a MORE permissive environment than AllowOverride All. When in doubt, start with that to make sure the rest of your configuration works, then narrow it down more specifically (for security's sake).

Solution 2:

This option can be used only inside a Directory element. So you have to specify a directory which should be protected.