• slider image 285
:::
windelf - 數位學習 | 2017-06-18 | 點閱數: 495

Step1. 設定 DNS- TWBBS.org 自由網域

FQDN                    型態        位址
windelf.twgogo.org            A  IP
class.windelf.idv.tw      CNAME        windelf.twgogo.org
natu.windelf.twgogo.org      CNAME        windelf.twgogo.org
soci.windelf.twgogo.org      CNAME        windelf.twgogo.org
or
class.windelf.idv.tw    A  IP

---------
Step2. 修改 httpd.conf 檔案

開啟 httpd.conf 檔案
vi /etc/httpd/conf/httpd.conf

開啟後,至最下方加入以下資料( DocumentRoot 為資料夾路徑)
NameVirtualHost 140.128.x.x

# sfs3
<VirtualHost 140.128.x.x>
DocumentRoot /var/www/html
Options FollowSymLinks
AddDefaultCharset big5
</VirtualHost>

# domains
<VirtualHost 140.128.x.x>
DocumentRoot /var/www/html/iblog
ServerName windelf.twgogo.org
AddDefaultCharset UTF-8
</VirtualHost>

# Subdomains1
<VirtualHost 140.128.x.x>
DocumentRoot /var/www/html/natu
ServerName natu.windelf.twgogo.org
AddDefaultCharset UTF-8
</VirtualHost>

# Subdomains2
<VirtualHost 140.128.x.x>
DocumentRoot /var/www/html/iclass
ServerName class.windelf.idv.tw
AddDefaultCharset UTF-8
</VirtualHost>
---------
Step3. 重新啟動 Apache
service httpd restart

參考網址
http://imkuso.com/build-website-subdomains/
http://www.pczone.com.tw/vbb3/archive/t-31623.html
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=flat&order=DESC&topic_id=30952&forum=9