March 20 2007
This will be of no interest to most people but it's useful to note for future reference. The various click-installer solutions to set up Apache and PHP under Windows such as WAMP don't seem to automate the setup of virtual hosts, but it's fairly straightforward to do manually:
C:Documents and SettingsUserMy DocumentsProject NameC:WINDOWSsystem32driversetchosts, eg:
127.0.0.1 localhost 127.0.0.1 project-name
httpd.conf file to include the virtualhost definitions at startup (The default WAMP install requires uncommenting this line and linking it to the correct file path), eg:
# Virtual hosts Include "c:/wamp/apache2/conf/extra/httpd-vhosts.conf"
httpd-vhosts.conf file, specify the mapping from the project folder to the new hostname:
NameVirtualHost * # this is the default mapping to http://localhost/DocumentRoot C:wampwww ServerName localhost # the new virtual host mapping to http://project-name/DocumentRoot "C:Documents and SettingsUserMy DocumentsProject Name" ServerName project-name Options Indexes FollowSymLinks Includes AllowOverride All Order deny,allow Deny from all Allow from 127.0.0.1 DirectoryIndex index.php
This Note
Asides