Skip to content
created by Aha00aAha00a at 2009-07-02
last modified by Aha00aAha00a at 2024-04-24
revision: 10

Apache htaccess

How To

담에 인터넷 안뒤져도 되도록 HowTo 형식으로 남깁니다. --2009-07-02

1. 준비

잠그고 싶은 폴더로 이동

2. .htpasswd 파일 만들기

아래를 실행하면 비밀번호를 물어보며, 현재 경로에 aha00a이라는 계정만 있는 passwd파일이 만들어지게 된다.

htpasswd -c .htpasswd aha00a
New password:
Re-type new password:
Adding password for user aha00a

3. .htpasswd에 추가

htpasswd .htpasswd aha00b
New password:
Re-type new password:
Adding password for user aha00b

4. .htaccess 파일 만들기

디렉터리에 .htaccess 파일을 만들어서 아래와 같이 지정합니다.

AuthType Basic
AuthName "AuthName"
AuthUserFile <absolute_path>/.htpasswd
require valid-user

AuthUserFile에는 절대경로로 지정해야함

5. 웹브라우저로 접근

인증창이 뜨면 성공

7. See Also

7.2. Similar Pages

Similar pages by cosine similarity. Words after page name are term frequency.

7.3. Adjacent Pages

Control
≤ 32
all
1.0x
1.0x
80
-120
ON
Metrics
Nodes(visible/total)0/0
Links(visible/total)0/0
Avg degree0.00
Depth coverage0
Queue(fetch/graph)0 / 0
Zoom(scale)1.00x
Ctrl/⌘ + Scroll: Zoom
Root 1-hop 2-hop+