I have set up my virtual hosts with xampp.
I uncommented the vhosts line in the httpd.conf
file and added the virtual hosts in the vhosts document. The files for the web pages are located in my htdocs folder (two separate folders for each page within the htdocs folder, was using the Documents folder but had permission errors).
I changed the hosts file as well, but when I try to access the page using 'http://pagename.local' instead of getting the page, I get an index which says:
Index of /
Name etc etc etc
pagename.local1
So i believe its giving me the index of the folder instead of the page?
My vhosts conf looks like this:
<VirtualHost 127.0.0.1>
DocumentRoot C:/Users/xxxxxx/Documents/xampp/htdocs/pagename1
ServerName pagename1.local
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot C:/Users/xxxxxx/Documents/xampp/htdocs/pagename2
ServerName pagename2.local
</VirtualHost>
also if I click on the pagename1.local in the index, it does take me to the page and in the url it displays: pagename1.local/pagename1.local
.