System/OS
2003.04.23 10:28
[linux] 아파치설치/설정 - 사용인증
Views 15886 Comment 0
1. 아파치 환경 설정 파일의 편집
$ vi /usr/local/apache/conf/http.conf
#AllowOverride None
#AllowOverride AuthConfig # 일단 이렇게
AllowOverride All # 안되면 이렇게
2. 암호를 걸고 싶은 디렉토리 내에다 암호파일을 생성
$ /usr/local/apache/bin/htpasswd -c .htpasswd admin # 암호파일 처음 생성시
New password: admin123
Re-type new password: admin123
$ /usr/local/apache/bin/htpasswd .htpasswd root # 암호파일에 두번째 사용자 추가시
3. 암호를 걸고 싶은 디렉토리 내에다 처리파일을 생성
$ vi .htaccess
AuthName "staff area” # 보호 디렉토리 대표이름
AuthType Basic # 인증 방법
AuthUserFile /usr/local/etc/httpd/.htpasswd # 암호 파일 위치
require valid-user # 특정 사용자만 허용
예)
AuthName "사용자 인증..."
AuthType Basic
AuthUserFile /usr/local/apache/htdocs/User/Member/Administrator/.htpasswd
AuthGroupFile /dev/null # 사용자가 많을 경우의 그룹 관리(안함)
<Limit GET POST>
require valid-user
</Limit>
ErrorDocument 401 ./error.htm # 에러시의 출력 문서
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
204 | System/OS | 개인적으로 쓰고 있는 bash_profile | hooni | 2015.01.16 | 2001 |
203 | System/OS | [mac] 패키지 매니저, MacPort | hooni | 2015.01.03 | 2137 |
202 | System/OS | [svn] Can't convert string from native encoding to 'UTF-8' 메시지가 나오는 경우 | hooni | 2014.12.18 | 2195 |
201 | System/OS | [linux] yum 업데이트 시 커널 제외하기 | hooni | 2014.09.11 | 2314 |
200 | System/OS |
[mac] Mac OS 패키지 매니저, HomeBrew
![]() |
hooni | 2015.01.03 | 2546 |
199 | System/OS | [svn] SVN trunk 변경사항 되돌리기 (SVN Rollback) | hooni | 2014.11.27 | 2606 |
198 | System/OS | [svn] 하나의 SVN에서 멀티 저장소 (One svnserve, multiple repositories) | hooni | 2015.01.02 | 2625 |
197 | System/OS | [mac] How to uninstall MySQL on Mac OS. | hooni | 2017.11.08 | 2632 |
196 | System/OS |
[virtualbox] VirtualBox에 Ubuntu 설치하기
![]() |
hooni | 2019.11.22 | 2640 |
195 | System/OS | [mac] Homebrew/rvm/cocoapod setting | hooni | 2017.07.29 | 2647 |
194 | System/OS | [linux] iptables 초간단 세팅 스크립트 | hooni | 2017.09.26 | 2695 |
193 | System/OS | [linux] CentOS 에 APM 설치하기 | hooni | 2015.01.02 | 2974 |