Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If you're reading my question, thanks, I appreciate your help

I'm using Wamp on Windows Vista.

I've created 2 project folders:

www/project1/ 
www/project2/

My virtual hosts file looks like this:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/project1/"
    ServerName project1.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/project2/"
    ServerName project2.com
</VirtualHost>

Can someone advise how I can go about doing this?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If the DNS for those domains is pointing elsewhere, you will have to add entries to your hosts file for them if you want them to resolve locally, eg:

127.0.0.1 first.com
127.0.0.1 second.com

Of course, if you want the whole world to connect to your local server when they visit those domains, you would need to edit the DNS settings for the domains.

share|improve this answer
    
That's not enough though, because all this does is take me to the webroot /wamp/www/. But I'm trying to forward first.com and second.com to the /first/ and /second/ folders which are one level deeper within the web root, hence my attempt to use Virtual Hosts and httpd-vhosts.conf. Any ideas why it's taking me to the root and not to the folders inside it? –  Chris Oct 4 '09 at 13:23
    
Ok I take that comment back. It looks like it was acting up because it looks like I had to restart Apache. I'm doing some testing now before I give the final verdict, and will update the thread when done. –  Chris Oct 4 '09 at 13:58

Umm, I don't think that really answered his question?

Try following this tutorial, and let me know if you still can't get it working:

http://www.kintek.com.au/web-design-blog/configuring-multiple-domains-within-wamp-for-local-development/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.