I want to create two subdomains for my domain. I got my domain at GoDaddy, lets say example.com and I created first.example.com and second.example.com as subdomains.
Now, this is the part I'm not sure. I went to Zone File Editor and added 2 CNAME(Alias).
1.
Host: first
points to: @
2.
Host: second
points to: @
I Also tried that on the A(Host).
Now, on XAMPP I did configurate the httpd-vhosts.conf:
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot c:/xampp/htdocs
ServerName example.com
ServerAlias www.example.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot c:/xampp/htdocs/first
ServerName first.example.com
ServerAlias www.first.example.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot c:/xampp/htdocs/second
ServerName second.example.com
ServerAlias www.second.example.com
</VirtualHost>
But the problem is that I always get example.com. Doesn't matter if I put first.example.com or second.example.com. I always reach example.com!
Any one know what I'm doing wrong?
Much appreciated.