해당 디렉토리에 인증을 시킬려면 .htaccess , .htpasswd 두 파일이 필요합니다.
1) .htaccess 작성하기 아래와 같이 작성하신후 인증을 거시고 싶은 디렉토리의 밑으로 옮기시면 됩니다.
AuthName access only members AuthType Basic AuthUserFile 디렉토리의절대경로/.htpasswd AuthGroupFile /dev/null ErrorDocument 401 require valid-user
|
절대경로는 /home/hosting_users/고객님id/www/디렉토리/ 입니다.
2) .htpasswd 작성하기 ssh 에서 해당 디렉토리로 이동하신 다음 다음과 같이 하시면 됩니다.
htpasswd -c .htpasswd 아이디 New password: (사용할 패스워드 입력) Re-type new password: (사용할 패스워드 재입력) Adding password for user hostway
|
[주의].htpasswd 파일 경로는 위에서 작성한 .htaccess 파일에 지정된 경로와 반드시
일치해야 합니다. 3) 새로운 유저를 추가할 때