Posted by:
tfabland
(---.hfc.comcastbusiness.net)
Why are you in C:/temp?
C:/wamp/www/ is docroot for the localhost and I see no reason to place your vshosts there. As photographer Fred Picker used to say "Different is not the same, only the same is the same".
I set up mine like below. This method more closely follows that of a live server i.e. files that don't have to be in docroot can instead be in the parent directory. On most nix type servers this would be /home/user_name/, with docroot as /home/user_name/www/ or /home/user_name/public_html/.
For example, I use codeigniter and keep all 'system' and 'application' directories and files in say /home/user_name/system/, /home/user_name/application/. On my local test server this would be C:/wamp/directory_name1/system/, C:/wamp/directory_name1/application/. Only those files that HAVE to be web accessible like images, css, js etc, would be placed within /home/user_name/www/ or C:/wamp/directory_name1/www/. PHP is more than capable of pulling in most resources from above docroot.
NameVirtualHost *:80
#######################################################
<VirtualHost *:80>
ServerAdmin
me@somewhere.comDocumentRoot "c:/wamp/wf/www"
ServerName wf
ErrorLog c:/wamp/logs/wf-error_log
CustomLog c:/wamp/logs/wf-access_log common
<Directory c:/wamp/wf/www>
Options +All +MultiViews
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
#######################################################
<VirtualHost *:80>
ServerAdmin
me@somewhere.comDocumentRoot "c:/wamp/fab/www"
ServerName fab
ErrorLog c:/wamp/logs/fab-error_log
CustomLog c:/wamp/logs/fab-access_log common
<Directory c:/wamp/fab/www>
Options +All +MultiViews
AllowOverride All
Allow from all
</Directory>
# I no longer have a need for cgi, but this is how I did it way back when:
#ScriptAlias /cgi-bin/ "c:/wamp/fab/www/cgi-bin/"
#<Directory c:/wamp/fab/www/cgi-bin>
# AddHandler cgi-script cgi pl
# Options +Indexes +FollowSymLinks +Includes +ExecCGI
# AllowOverride All
# Order allow,deny
# Allow from all
#</Directory>
</VirtualHost>
#######################################################
<VirtualHost *:80>
ServerAdmin
me@somewhere.comDocumentRoot "c:/wamp/sb/www"
ServerName sb
ErrorLog c:/wamp/logs/sb-error_log
CustomLog c:/wamp/logs/sb-access_log common
<Directory c:/wamp/sb/www>
Options +All +MultiViews
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
#######################################################
# LEAVE LOCALHOST IN THE LAST POSITION IN FILE
# (Not sure this is "required" but it did solve a past problem for me, but I don't recall what it was
#######################################################
<VirtualHost *:80>
ServerAdmin
me@somewhere.comDocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog c:/wamp/logs/localhost-error_log
CustomLog c:/wamp/logs/localhost-access_log common
<Directory c:/wamp/www/>
Options +All +MultiViews
AllowOverride All
</Directory>
</VirtualHost>