I am trying to create a virtual host in xampp windows 7.
#NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/project/Trunk/xyz"
ServerName xyz.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
host
127.0.0.1 localhost
127.0.0.1 xyz.local
Edit 1: httpd -t -D DUMP_VHOSTS
result is given below
VirtualHost configuration:
*:80 is a NameVirtualHost
default server abcd (C:/xampp/apache/conf/extra/httpd-vhosts.conf:45)
port 80 namevhost abcd (C:/xampp/apache/conf/extra/httpd-vhosts.conf:45)
port 80 namevhost localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:49)
port 80 namevhost xyz.local (C:/xampp/apache/conf/extra/httpd-vhosts.conf:53)
*:443 www.example.com (C:/xampp/apache/conf/extra/httpd-ssl.conf:102)
Edit 2: Attachment - website not found error
Calling http://xyz.local/
shows the website not found error. But if I configure entire thing with only xyz
(not .local
in the string xyz.local
) it is working fine after calling http://xyz/
. I want it as http://xyz.local/
. How can I achieve this?