I would like to use Name-Based Virtual Host configurations in my httpd.conf file in order to create different name based servers on one IP. The thing is, however, is that I'd like to do this all locally.
This is my local development box, and I would like to do something like this:
<VirtualHost *:80>
DocumentRoot c:/www/htdocs/
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/www/htdocs/test/
ServerName test
</VirtualHost>
In order to go to http://test/ and http://localhost/ and have them bring back different sites.
I have no problem editing the hosts file in order to map the server names to my local IP address.
Has anyone got something like this working? Basically I want to be able to treat each site I work on as seperate units and be able to code them relative to the site root.
right now, i have to do http://localhost/test/ which just adds another directory, and forces me to write code that is document relative, which is starting to be a pain.
Thanks in advance for your comments and answers.