0

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?

2 Answers2

1

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.

  • 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? –  Oct 04 '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. –  Oct 04 '09 at 13:58
0

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/