System/OS
2003.04.23 10:28
[linux] 아파치설치/설정 - 사용인증
조회 수 15140 댓글 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 # 에러시의 출력 문서
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
130 | System/OS | [mac] Mac OS 패키지 매니저, HomeBrew | hooni | 2015.01.03 | 1448 |
129 | System/OS | [mac] How to uninstall MySQL on Mac OS. | hooni | 2017.11.08 | 1028 |
128 | System/OS | [mac] Homebrew/rvm/cocoapod setting | hooni | 2017.07.29 | 1164 |
127 | System/OS | [mac] Charlesproxy 간단한 설정 내용~ | hooni | 2013.11.12 | 12431 |
126 | System/OS | [macos] How to Fix ‘You Shut Down Your Computer Because of a Problem’ | hooni | 2022.06.01 | 931 |
125 | System/OS | [linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치) | hooni | 2013.04.23 | 13134 |
124 | System/OS | [linux] 프로세스의 stat 상태에 대한 설명 | hooni | 2013.04.23 | 10824 |
123 | System/OS | [linux] 프로세스 상태확인(ps) | hooni | 2003.04.23 | 12768 |
122 | System/OS | [linux] 프로그램 설치방법 (내공쌓기) | hooni | 2003.04.23 | 13483 |
121 | System/OS | [linux] 패킷의 소스 주소 바꾸기 | hooni | 2003.04.23 | 18848 |
120 | System/OS | [linux] 패킷 스니퍼링 | hooni | 2003.04.23 | 16375 |
119 | System/OS | [linux] 파일내 문자열 찾아 바꾸기 | hooni | 2013.04.23 | 12259 |