이 글 두 번째 올려염... ㅡ.ㅡ
가상 웹사이트는 아래와 같이 httpd.conf 에 설정돼 있습니다.
중략...
# linux.uoou.com
<VirtualHost 211.168.99.138>
ServerName linux.uoou.com
DocumentRoot /home/park/public_html
<Directory "/home/park/public_html/auth">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
이하 생략...
이렇게 설정이 돼 있습니다.
인증을 걸 해당 디렉토리(auth)에서 .htaccess 를 아래와 같이 작성한 후
- .htaccess -------------------------------------------------------
AuthName "Auth Test!!!"
AuthType Basic
AuthUserFile /home/park/public_html/auth/.htpasswd
AuthGroupFile /dev/null
<Limit GET POST>
require valid-user
</Limit>
----------------------------------------------------------------
/usr/local/apache/bin/htpasswd -c .htpasswd test
암호 입력
이렇게 하니까 인증이 잘 됩니다.
하지만...
httpd.conf 의 가상 웹사이트 설정부분에서... 아래와 같이 또 다른 사이트
가 추가 돼 있을 경우...
# aaa.com
<VirtualHost 211.168.99.138>
ServerName aaa.com
DocumentRoot /home/aaa/public_html
</VirtualHost>
# bbb.com
<VirtualHost 211.168.99.138>
ServerName bbb.com
DocumentRoot /home/bbb/public_html
</VirtualHost>
... ... 이하 생략...
위와 같이 돼 있을 경우 bbb.com 에 대해서도 특정 디렉토리에 대한 인증을
원하고자 할 경우 반드시 httpd.conf 에서 아래와 같은 디렉토리 설정 구문
을 웹서버 관리자가 추가 해 주어야만 하는지요???
<Directory "인증을 요하는 디렉토리">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
부탁 드립니다...
좋은 하루 되십시오..