環境:
1)WIN2003(X86)阿裡雲ECS
2)apache2.2(啟用vhosts.conf)
步驟:
1)打開apache\conf\extra\httpd-vhosts.conf
2)在 VirturalHost标簽對中輸入DirectoryIndex index.php //index.php即為網站預設首頁
<VirtualHost *:80>
DocumentRoot D:\www\abc
ServerName www.abc.com
DirectoryIndex index.php
</VirtualHost>
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsICNwITMwQTN0EzMwgDM0EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)