Sorry for being dense, but it's not clear to me... I am struggling to use the method on the xampptutorials.com site. (The site went down there, just as I was posting my question; hence my decision to post here.) I was working with the "pre-1.5.1" method of setting up virtual hosts (I've got 1.4.13).
With said method, do I now need to be saving my actual files in the www/whatever folder rather than in htdocs/whatever? Or is this method intended to have the htdocs "recognized" as if they were in the www folder? I've been attempting it both ways: from an existing site stored in htdocs (note again, I'm on 1.4.13); and from a new test site in the www folder. My httpd.conf file looks like this:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/xampp/xampp/htdocs [I've also tried with simply DocumentRoot C:/xampp/htdocs]
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/www/pactum3
ServerName localhost.pactum3
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:/www/test
ServerName localhost.test
</VirtualHost>
... and my HOSTS file looks like this:
127.0.0.1 localhost
127.0.0.1 localhost.pactum3
127.0.0.1 localhost.test
I can't seem to get either one of these to work. But maybe I'm missing another step... this, for example:
http://localhost.pactum3/
.. gives me a xampp Splash page by default:
http://localhost.pactum3/xampp/splash.php
The same holds true for this:
http://localhost.test
..which brings up this:
http://localhost.test/xampp/splash.php
(Both my htdocs/pactum3 directory and my www/test directory have index.php files in them.)
What have I missed? Thanks!
Once again: I've used xampp for about a year, but have never done the virtual hosts thing. The only reason I want to do it now is because I want to use site root relative links and have Apache recognize the proper root of the site. I.e. I'm not interested in using my computer as a public server. In short, my interest is in LOCAL TESTING only.