Wednesday, August 1, 2012

Virtual Host XAMPP Windows

C:\WINDOWS\system32\drivers\etc
tambahkan di akhir baris 
127.0.0.1 namaweb.com

kemudian buat folder namaweb.com di htdocs folder xampp

Habis itu edit httpd-vhosts.conf di Files\xampp\apache\conf\extra
di akhir baris kita buat virtual host dengan menambahkan perintah dibawah ini

NameVirtualHost namaweb:80
<VirtualHost localhost:80>

ServerAdmin webmaster@localhost

DocumentRoot "C:/Program Files/xampp/htdocs"

ServerName localhost
</VirtualHost>

NameVirtualHost namaweb.com:80
<VirtualHost namaweb.com:80>

ServerAdmin webmaster@namaweb.com

DocumentRoot "C:/Program Files/xampp/htdocs/namaweb.com"

ServerName namaweb.com
</VirtualHost>

Restart XAMPP

1 comment: