<-
Apache > HTTP Server > Documentation > Version 2.2 > 모듈

Please note

This document refers to a legacy release (2.2) of Apache httpd. The active release (2.4) is documented here. If you have not already upgraded, please follow this link for more information.

You may follow this link to go to the current version of this document.

아파치 모듈 mod_userdir

가능한 언어:  en  |  ja  |  ko  |  tr 

이 문서는 최신판 번역이 아닙니다. 최근에 변경된 내용은 영어 문서를 참고하세요.
설명:사용자별 디렉토리
상태:Base
모듈명:userdir_module
소스파일:mod_userdir.c

요약

이 모듈을 사용하면 http://example.com/~user/ 식으로 사용자별 디렉토리에 접근할 수 있다.

지시어들

참고

top

UserDir 지시어

설명:사용자별 디렉토리 위치
문법:UserDir directory-filename
기본값:UserDir public_html
사용장소:주서버설정, 가상호스트
상태:Base
모듈:mod_userdir

UserDir 지시어는 사용자의 문서에 대한 요청을 받을때 사용자 홈디렉토리 안에서 사용할 실제 디렉토리를 지정한다. Directory-filename은 다음 중 하나이다:

Userdir 지시어에 enableddisabled 키워드를 사용하지 않으면, 아규먼트를 파일명 패턴으로 처리하여 디렉토리로 변환한다. http://www.foo.com/~bob/one/two.html에 대한 요청은 다음과 같이 변환된다:

사용한 UserDir 지시어 변환한 경로
UserDir public_html~bob/public_html/one/two.html
UserDir /usr/web/usr/web/bob/one/two.html
UserDir /home/*/www/home/bob/www/one/two.html

다음 지시어는 클라이언트에게 리다이렉션을 보낸다:

사용한 UserDir 지시어 변환한 경로
UserDir http://www.foo.com/usershttp://www.foo.com/users/bob/one/two.html
UserDir http://www.foo.com/*/usrhttp://www.foo.com/bob/usr/one/two.html
UserDir http://www.foo.com/~*/http://www.foo.com/~bob/one/two.html
이 지시어를 사용할때 주의하라; 예를 들어, "UserDir ./""/~root"를 아마도 바람직하지 않게 "/"로 변환한다. 설정에 "UserDir disabled root"를 포함하길 강력히 권한다. 자세한 정보를 알려면 Directory 지시어와 보안 팁도 참고하라.

추가 예제:

몇몇 사용자에게만 UserDir 디렉토리를 허용한다면, 다음과 같다:

UserDir disabled
UserDir enabled user1 user2 user3

대부분의 사용자에게 UserDir 디렉토리를 허용하고 일부만 거부한다면, 다음과 같다:

UserDir enabled
UserDir disabled user4 user5 user6

다른 사용자 디렉토리를 지정할 수도 있다. 다음과 같은 명령어를 사용한다면:

Userdir public_html /usr/web http://www.foo.com/

http://www.foo.com/~bob/one/two.html 요청을 하면, 먼저 ~bob/public_html/one/two.html 페이지를 찾고, /usr/web/bob/one/two.html을 찾은 후, 마지막으로 http://www.foo.com/bob/one/two.html으로 리다이렉션을 보낸다.

리다이렉션을 사용한다면 목록의 마지막에 두어야 한다. 아파치는 리다이렉션이 성공했는지 알 수 없기때문에, 리다이렉션을 목록 앞에 두면 항상 리다이렉션을 사용하게 된다.

참고

가능한 언어:  en  |  ja  |  ko  |  tr 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
Comments are disabled for this page at the moment.