1. 修改 hosts
路徑 C:\Windows\System32\drivers\etc\hosts,加上
127.0.0.1  test.local

2. 修改 httpd-vhosts.conf
路徑 C:\xampp\apache\conf\extra\httpd-vhosts.conf  加上

NameVirtualHost *

<VirtualHost *>
    DocumentRoot "D:\www\www_test"
    ServerName test.local
   <Directory "D:\www\www_test">
    AllowOverride All
    Require all granted
  </Directory> 
</VirtualHost>

註:以上是 apache 2.4 的設定方法,如果是 apache 2.2 的話請把 <Director> 改為
   <Directory "D:\www\www_test">
    Order allow,deny
    Allow from all
  </Directory> 

3. 重新啟動 apache

arrow
arrow
    全站熱搜

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