apache 아파치 인증
페이지 정보
작성자 최고관리자 작성일 21-02-10 16:50 조회 5,847 댓글 0본문
1. httpd.conf
################################################
<Directory /home/httpd/html/인증디렉토리 >
Options FollowSymlinks
AllowOverride AuthConfig
ErrorDocument 401 "죄송합니다. 관리자만 들어올수 있습니다."
</Directory>
## AccessFileName .htaccess //디폴트 파일명,숨김으로 변경 요망
################################################
2. 인증디렉토리에 파일만듬
################################################
[root@ADNEC public_html]# vi /home/httpd/html/인증디렉토리/.htaccess
AuthName "관리자"
AuthType Basic
AuthUserFile /home/httpd/html/인증디렉토리/.htpasswd
AuthGroupFile /dev/null
<Limit GET POST>
require valid-user
</Limit>
################################################
3. 패스워드입력
################################################
/usr/local/apache/bin/htpasswd -c /home/httpd/html/인증디렉토리/.htpasswd 사용자
################################################
################################################
<Directory /home/httpd/html/인증디렉토리 >
Options FollowSymlinks
AllowOverride AuthConfig
ErrorDocument 401 "죄송합니다. 관리자만 들어올수 있습니다."
</Directory>
## AccessFileName .htaccess //디폴트 파일명,숨김으로 변경 요망
################################################
2. 인증디렉토리에 파일만듬
################################################
[root@ADNEC public_html]# vi /home/httpd/html/인증디렉토리/.htaccess
AuthName "관리자"
AuthType Basic
AuthUserFile /home/httpd/html/인증디렉토리/.htpasswd
AuthGroupFile /dev/null
<Limit GET POST>
require valid-user
</Limit>
################################################
3. 패스워드입력
################################################
/usr/local/apache/bin/htpasswd -c /home/httpd/html/인증디렉토리/.htpasswd 사용자
################################################
댓글목록 0
등록된 댓글이 없습니다.