What ports are you listening on? What does your apache error log say? The error log will usually let you know if you have a syntax error.
Here is my sample vhost test setup you can use as a reference:
- Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "C:/xampp/htdocs">
Require all granted
AllowOverride All
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@test1.com
DocumentRoot "C:/xampp/vhosts/test1"
ServerName test1.com
ServerAlias test1.com
ErrorLog "logs/test1.com-error.log"
CustomLog "logs/test1.com-access.log" common
<Directory "C:/xampp/vhosts/test1">
Require all granted
AllowOverride All
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@test2.com
DocumentRoot "C:/xampp/vhosts/test2"
ServerName test2.com
ServerAlias test2.com
ErrorLog "logs/test2.com-error.log"
CustomLog "logs/test2.com-access.log" common
<Directory "C:/xampp/vhosts/test2">
Require all granted
AllowOverride All
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
Both my test1.com and test2.com have entries in the Windows hosts file in addition to the existing localhost entry.