System/OS
2003.04.23 10:28
[linux] 아파치설치/설정 - 사용인증
Views 15155 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 |
---|---|---|---|---|---|
82 | System/OS | [linux] 패킷의 소스 주소 바꾸기 | hooni | 2003.04.23 | 18869 |
81 | System/OS | [linux] 프로그램 설치방법 (내공쌓기) | hooni | 2003.04.23 | 13499 |
80 | System/OS | [linux] 프로세스 상태확인(ps) | hooni | 2003.04.23 | 12791 |
79 | System/OS | [linux] 프로세스의 stat 상태에 대한 설명 | hooni | 2013.04.23 | 10843 |
78 | System/OS | [linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치) | hooni | 2013.04.23 | 13164 |
77 | System/OS | [macos] How to Fix ‘You Shut Down Your Computer Because of a Problem’ | hooni | 2022.06.01 | 984 |
76 | System/OS | [mac] Charlesproxy 간단한 설정 내용~ | hooni | 2013.11.12 | 12453 |
75 | System/OS | [mac] Homebrew/rvm/cocoapod setting | hooni | 2017.07.29 | 1188 |
74 | System/OS | [mac] How to uninstall MySQL on Mac OS. | hooni | 2017.11.08 | 1055 |
73 | System/OS | [mac] Mac OS 패키지 매니저, HomeBrew | hooni | 2015.01.03 | 1480 |
72 | System/OS | [mac] Mac OS에서 재생되는 사운드를 녹음하는 방법 | hooni | 2016.10.03 | 1750 |
71 | System/OS | [mac] Mac에서 Mac으로 원격제어하기 (맥에서 맥으로) | hooni | 2013.10.08 | 37265 |