Help with virtual hosting required..
Posted: 01. July 2014 01:36
Hi guys, I cannot get my head around setting up virtual hosting in xampp. I have entered the following codes as suggested by numerous tutorials. The server seems to find the index.html, but does not render it properly. i.e cannot find the css file, and gives a 404 error for links. Can somebody please explain what I am doing wrong?
TIA
c:\windows\system32\driver\etc\hosts
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 truvotes.localhost
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs/truvotes
ServerName truvotes.localhost
<Directory "C:/xampp/htdocs/truvotes">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
TIA
c:\windows\system32\driver\etc\hosts
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 truvotes.localhost
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs/truvotes
ServerName truvotes.localhost
<Directory "C:/xampp/htdocs/truvotes">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>