i managed to work 'Basic Auth' but there may be mistakes . please correct them .
www root is /var/apache2/htdocs/ .
conf file is /etc/apache2/httpd2.conf .
cd /etc/apache2/
htpasswd .htpasswd XXX
chmod 644 .htpasswd <- correct ?
# head /etc/apache2/httpd2.conf
<Directory "/var/apache2/htdocs/YYY">
AuthType Basic
AuthName "Secret Zone"
AuthUserFile /etc/apache2/.htpasswd
Require user XXX
</Directory>
---
tuyosi

