Make sure the httpd-vhosts.conf line is uncommented in httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Go to C:\xampp\apache\conf\extra
Add the following to httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin postmaster@host.localhost
DocumentRoot "C:\Users\User\Documents\Website1"
ServerName yi
ServerAlias www.yi
ErrorLog "logs/yi.localhost-error.log"
CustomLog "logs/yi.localhost-access.log" combined
<Directory "C:\Users\User\Documents\Website1">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost><VirtualHost *:80>
ServerAdmin postmaster@host.localhost
DocumentRoot "C:\Users\User\Documents\Website2"
ServerName yi2
ServerAlias www.yi2
ErrorLog "logs/yi2.localhost-error.log"
CustomLog "logs/yi2.localhost-access.log" combined
<Directory "C:\Users\User\Documents\Website2">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Go to
%windir%\system32\drivers\etc\
and edit hosts file
127.0.0.1 yilocal
127.0.0.1 yi2local
127.0.0.1 www.yilocal
127.0.0.1 www.yi2local
Restart xampp