1. 사용자 계정(유저)별로 웹서버 운영하기 위해 아파치 설정 파일 httpd.conf 을 열어 UserDir 항목으로 이동한다.
2. UserDir 항목으로 이동하여 UserDir disable 로 되어 있는 부분을 주석처리한다.
3. UserDir public_html 부분의 주석을 해제해서 활성화시켜 준다.
<Directory/home/*/public_html> ~ </Directory> 태크로 되어 있는 것을 확인할 수 있는데 이 내용의 주석을 모두 해제하여 활성화시킨다.
<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
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
4. 아파치 웹 서버를 재시작 합니다.
[root@localhost root]# /usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd restarted
5. 루트권한이 필요한것은 여기까지 입니다. 이제는 일반 계정으로 접속하여 홈디렉토리에
웹문서를 작성해봅니다.
유저를 생성하고 비밀번호를 부여합니다.
유저 아래에 public_html 디렉토리를 생성하고 권한설정 chmod 하고 index 화일을 만듭니다.
6. 작성하고 권한 설정을 했으니 외부 웹브라우저에서 접속합니다.
http://아이피주소/~hansung접속이 안됩니다..
http://아이피주소/~hansung/접속이 됩니다.
http://아이피주소/~hansung/index.html접속이 됩니다.
http://아이피주소/~hansung 뒤에 "/"를 붙여야 합니다..
참조 사용자 계정별로 웹 서버 운영하기, UserDir public_html
http://blog.naver.com/samusahan?Redirect=Log&logNo=80040209395