리눅스 사용자마다 웹사이트를 줄수있습니다.
예전에 개인홈페이지를 주었던식으로.
http://homepage.com/~jabcholove 이런식으로 됩니다.


설정파일을 vi,vim으로 열어줍니다.루트 사용자로..
http버젼에 따라 줄은 다를수있습니다. 찾아보면 다 나옵니다. 
[root@www ~]# vi /etc/httpd/conf/httpd.conf


# line 366: make it comment

#
UserDir disable
# line 373: uncomment

UserDir public_html
# line 381-392: uncomment

<Directory /home/*/public_html>
    AllowOverride 
All
# change

    Options 
ExecCGI
# enable CGI

    <Limit GET POST OPTIONS>
         Order allow,deny
         Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
         Order deny,allow
         Deny from all
    </LimitExcept>
</Directory>


 

[root@www ~]# /etc/rc.d/init.d/httpd start 
Starting httpd (via systemctl): Starting httpd: [ OK ]
Starting httpd: [ OK ]
[ OK ]

유져 홈디렉토리를 만들고 권한을 설정해줍니다.
테스트 페이지를 만들어 확인합니다.


[fedora@www ~]$ 
mkdir public_html 

[fedora@www ~]$ 
chmod 711 /home/jabcholove 

[fedora@www ~]$ 
chmod 755 /home/jabcholove/public_html 

[fedora@www ~]$ 
cd public_html 

[fedora@www public_html]$ 
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 "Userdir Test Page";
print "\n</div>\n";
print "</body>\n</html>\n";

[jabcholove@www public_html]$ 
chmod 705 index.cgi

+ Recent posts