apache 사용자 인증

1. httpd.conf 파일 디렉토리 권한 설정

<Directory “/home/munin”>
Options FollowSymLinks
AllowOverride AuthConfig     <— None을 AuthConfig로 변경
</Directory>
2. .htaccess 파일생성

[root@localhost munin]cat /home/munin/.htaccess
AuthType Basic
AuthName “Members Only”
AuthUserFile /home/munin/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
3. htpasswd 명령으로 계정 생성

/home/apache/bin/htpasswd -c .htpasswd admin

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다