I’m stumped here, have been trying since yesterday to figure this out… like most people, I suppose, I need to run more than one website on xampp (just like I do on Tomcat…) but I’m finding it difficult to set it up: example of a virutal host for my installation of xampp is as follows in C:\xampp\apache\conf\extra\httpd-vhosts.conf:
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot “C:/xampp/htdocs/dummy-host2.localhost”
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog “logs/dummy-host2.localhost-error.log”
##CustomLog “logs/dummy-host2.localhost-access.log” combined
##</VirtualHost>
following this example, did:
<VirtualHost *:80>
ServerAdmin webmaster@clientA.localhost
DocumentRoot “C:\Documents and Settings\<me>\My Documents\clientA\html”
ServerName clientA.localhost
ServerAlias www.clientA.localhost
ErrorLog “logs/host.clientA.com-error_log”
CustomLog “logs/clientA.localhost-access.log” combined
</VirtualHost>
but don’t see where you tell it what the actual dir is where the files are for the website, like in this example:
http://sawmac.com/xampp/virtualhosts/
following example in above url, I did:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot “C:\Documents and Settings\<Me>\My Documents\clientA\website”
ServerName clientA.local
<Directory “C:\Documents and Settings\<Me>\My Documents\clientA\website”>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
but nothing I try seems to work… (don’t know what version of xampp/apache I have, where do you look this up? at any rate installed very recently, whatever is latest here, www.apachefriends.org/en/xampp-windows.html)
how come example in my C:\xampp\apache\conf\extra\httpd-vhosts.conf doesn’ thave <Directory>…</Directory>? (and what is diff betw DocumentRoot and Directory? )
I did do what you’re supposed to do in that ‘hosts’ file (namely add “127.0.0.1 clientA.local” )
thank you…