This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

修性不修命,萬劫陰靈難入聖; 修命不修性,猶有家財無主柄
Album | Blog | Comment | Profile | Control Panel
aquatower | 1 August,2009 9:19

2. 個人網站:public_html

(1)建立目錄及index.html
#chmod 701 /home/student
#su - student
[student@server118 ~]$
$mkdir public_html

%可以在/etc/skel 先設定, useradd會自動幫user建立public_html目錄

[student@server118 ~]$ cat > index.html < > Student public homepage
> student public homepage
> ookk
[student@server118 ~]$


(2)修改SElinux指紋

[root@server118 public_html]# restorecon -R /home/student/public_html
[root@server118 public_html]# ll -Z
-rw-rw-r-- student student root:object_r:httpd_sys_content_t index.html

(3)建立soft link
*未建立link前
http://server118.example.com/~student

* 建立link (比較方便user使用)
#ln -s /home/student/public_html /var/www/html/student
http://server118.example.com/student

(4) vi /etc/httpd/conf/httpd.conf
---略---
# 加"#" 打開UserDir
#UserDir disable
---略---
# 把"#"拿掉, UserDir=$HOME/public_html
UserDir public_html
---略---

(5)重新啟動httpd
#service httpd restart


Comment

Trackback

Comment Permissions: Only members may comment. If you are not a PIXNET member, click here to sign up.