В доке по .htaccess говорится, что аутентификация м.б. определена
в самом http.confThere is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things.
После перенесения .htaccess в Directory в httpd.conf получилось следующее:
<Directory "/usr/local/apache2/htdocs/so">
AllowOverride None
Options None
Order allow,deny
Allow from all
AuthUserFile /usr/local/apache2/htdocs/so/.htpasswd
AuthName so
AuthType Basic
require valid-user
</Directory>
Вроде бы все работает, но хотелось бы уточнить, где лучше хранить
файл .htpasswd - в дир-ии, к которой установлено ограничение, или рядом с httpd.conf