메뉴 건너뛰기

infra

[APACH] 개인 계정 연결 하기

박영식2009.04.25 02:11조회 수 2222댓글 0

    • 글자 크기

APACHE 설정 파일 httpd.conf에서 userdir 관련한 설정을 하면 된다.

Include conf/extra/httpd-userdir.conf

로 따로 분리된 경우 아래가 기본 설정이다.

# Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


public_html이 기본 directory 인데, adduser 명령 수행시 index.php까지 자동 생성하게 하려면,
/etc/skel/ 아래에 public_html과 그 아래 index.php까지 생성해 준다.

접속은
http://호스트/~유저네임
으로 하면 되는데,
chmod 701  /home/유저네임
을 해 줘야,
Forbidden
You don't have permission to access /~nice on this server.
에러 메세지가 나오지 않는다.

박영식 (비회원)
    • 글자 크기

댓글 달기

박영식
2011.03.17 조회 1710
박영식
2011.03.07 조회 2059
박영식
2010.04.22 조회 3234
박영식
2010.01.09 조회 3316
첨부 (0)
위로