Mengaktifkan virtual host
Membuat local domain
contoh
127.0.0.2 local.mycontacts.edu
Configurasi virtual host
<VirtualHost *:80>
DocumentRoot “dir”
ServerName hostname
ServerAlias hostname
contoh:
<VirtualHost 127.0.0.2:80>
DocumentRoot “C:\xampp\htdocs\my-contacts\public”
ServerName local.mycontacts.edu
contoh lain
Contoh 1:
<VirtualHost *:80>
DocumentRoot “dir”
ServerName hostname
ServerAlias hostname
Contoh 2:
<VirtualHost *:80>
DocumentRoot “dir”
ServerName hostname
ServerAlias hostname
DirectoryIndex index.php
<Directory “dir”>
Options All
AllowOverride All
Order Allow,Deny
Allow from all
#xampp #virtual #hosts #virtualhost #web