環境 Apache 2.2
先在 httpd.conf 設定:
→ Listen 8080
→ Include conf/extra/httpd-vhosts.conf
接著在 conf/extra/httpd-vhosts.conf 設定:
→ NameVirtualHost localhost:8080
→ <VirtualHost localhost:8080>
→ DocumentRoot "C:/wamp/www/web8080"
→ ServerName localhost
→ ErrorLog "logs/web8080-error.log"
→ CustomLog "logs/web8080-access.log" common
→ </VirtualHost>
若要在本機上能 access 到某個 host,需要在C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS 加入一筆記錄