Page 1 of 1

need to add VirtualHost

PostPosted: 21. September 2007 08:04
by ilyail3
hello, I'm using the latest version of xampp but I have a small issue with it.
I need to add couple VirtualHosts.
I searched the internet and found this
<VirtualHost *:80>
ServerAdmin root@example.com
ServerName example.localhost
ServerAlias example.localhost
DocumentRoot C:\xampp\htdocs\example
</VirtualHost>

but instead of getting to this dir when typing example.localhost(page not found).
I get there when I type 'localhost'
can someone help me?

PostPosted: 26. September 2007 00:25
by delftdamage
<VirtualHost *:80>
ServerName localhost
ServerAdmin admin@localhost
DocumentRoot "c:/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName subdomain.site.com
ServerAdmin admin@localhost
DocumentRoot "c:/xampp/htdocs/subdomain"
</VirtualHost>

These examples work fine.
I think localhost can't have subdomains or you have misspelled something.
(Check your apache logs)