虛擬伺服器可以設定一組domain name對應一個資料夾

例:

http://www1.feka.com 對應到 C:\Apache\www\test1 的內容
http://www2.feka.com 對應到 C:\Apache\www\test2 的內容


設定方法:

1.打開httpd.conf

2.在檔案最後加入
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot 資料夾路徑1
ServerName domain name 1
</VirtualHost>

<VirtualHost *:80>
DocumentRoot 資料夾路徑2
ServerName domain name 2
</VirtualHost>

.
.
.

<VirtualHost *:80>
DocumentRoot 資料夾路徑n
ServerName domain name n
</VirtualHost>

依此類推

Creative Commons License
本 著作 係採用
創用 CC 姓名標示-非商業性-禁止改作 2.5 台灣 授權條款授權.
arrow
arrow
    全站熱搜

    bshadow 發表在 痞客邦 留言(0) 人氣()