How do I limit access to wp-admin to an IP range?
I have traced the problem to a set of directions in the .conf file: the Virtual Host was missing this: <Directory “/var/www”> AllowOverride All </Directory> Which made the server to ignore .htaccess files altogether. The full answer is here