- Code: Select all
NameVirtualHost 127.0.0.1:80
NameVirtualHost 0.0.0.0:80
<VirtualHost 0.0.0.0:80 127.0.0.1:80 localhost>
DocumentRoot C:/xampp/htdocs/
ServerName localhost
</VirtualHost>
<VirtualHost 0.0.0.0:80 127.0.0.1:80 testserver1>
DocumentRoot C:/projects/testserver1/
ServerName testserver1
ServerAlias testserver1
<Directory "C:/projects/testserver1">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 0.0.0.0:80 127.0.0.1:80 testserver2>
DocumentRoot C:/projects/testserver2/
ServerName testserver2
ServerAlias testserver2
<Directory "C:/projects/testserver2">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Private IP changed for 0.0.0.0
I have also added each one into my hosts file, which is correct as I can ping each one successfully.
The problem I have is that the first two work, and also work from other computers that have the correct ip in the hosts file. However the third one doesn't. It has taken me all day of trawling through tutorials on how to set this up to get it to work for the first two. I'm at my wits end with this, it is so confusing!
I have had to put the ip's in the way I have to get them to work accross the network, yet it still isn't working correctly!
Any ideas??