1. 버추얼 또는 host.conf 에 해당 구문 삽입
<Directory "/home/계정명/public_html">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
2. 아파치 리스타트 (httpd -t 옵션으로 먼저 테스트를 한후에 리스타트)
3. public_html 디렉토리 안에 .htaccess 파일 생성
내용
AuthType Basic
AuthName "제목란"
AuthUserFile /home/계정명/.passhttp [.passhttp는 원하는 파일명]
Require valid-user
4. 첫번째 사용자 등록시
./htpasswd -c /home/계정명/.passhttp 등록할 사용자명
기존 정보에 새로운 사용자 등록시
./htpasswd /home/계정명/.passhttp 등록할 사용자명
0 개의 댓글:
댓글 쓰기