<VirtualHost *:80>
#ServerAdmin [email protected]
DocumentRoot "D:/xampp/htdocs/web"
ServerName www.web.com
ErrorLog "logs/web-error.log"
<Directory "D:/xampp/htdocs/web">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
#ServerAdmin [email protected]
DocumentRoot "D:/xampp/htdocs/web2"
ServerName www.web2.com
ErrorLog "logs/web2-error.log"
<Directory "D:/xampp/htdocs/web2">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
// Main Server
ServerName Localhost:80
DocumentRoot "c:/Wamp/Apache24/htdocs"
<Directory "c:/Wamp/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
httpd v-hosts
Code (PHP)
<VirtualHost 127.0.0.1:80>
DocumentRoot "C:/wamp/www/web2"
ServerName www.goatfarmstudios.local
ErrorLog "C:/Wamp/www/logs/web-error.log"
<Directory "C:/wamp/www/web2">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
ตอนนี้ปัญหาคือ ผม ping www.goatfarmstudios.local ไม่ได้ครับ มันขึ้น
"Ping request could not find host www.goatfarmstudios.local please check the name and retry again."