[root@nsBunny~]# vi /etc/httpd/conf/httpd.conf

LoadModule userdir_module modules/mod_userdir.so

<IfModule mod_userdir.c>

UserDir www  ==> 계정의 web루트 설정 <보통은 public_html>

<Directory /home/*/www>

    AllowOverride All

    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI

    <Limit GET POST OPTIONS>

        Order allow,deny

        Allow from all

    </Limit>

    <LimitExcept GET POST OPTIONS>

        Order deny,allow

        Deny from all

    </LimitExcept>

</Directory>

DirectoryIndex index.html index.html.var index.htm INDEX.HTML index.cgi

[root@nsBunny~]# service httpd restart

[root@nsBunny~]# su - bunny

[bunny@ns ~]$ mkdir www

[bunny@ns ~]$ chmod 711 /home/bunny

[bunny@ns ~]$ chmod 755 /home/bunny/www

[bunny@ns ~]$ cd www

[bunny@ns www]$ vi index.cgi

#!/usr/local/bin/perl

print "Content-type: text/html\n\n";

print "<html>\n<body>\n";

print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n";

print "User Test Page ( /home/bunny/www )";

print "\n</div>\n";

print "</body>\n</html>\n";

[bunny@ns www]$ chmod 705 index.cgi

만약 외부에서 폐이지가 열리지 않을경우 Selinux의 보안 설정을 0으로 해재 한다.

[root@nsBunny/etc/httpd/conf]# setenforce 0

그 다음에 계정 홈 폐이지로 접속해서 확인해 본다. 폐이지가 열리는지!

http://xxxxxxxxxxx.pe.kr/~bunny 

 

 

+ Recent posts