Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry for a question which has probably been brought up many times but I'm yet to find a example that can help me out.

At home I have a WAMP server with two folders in the /wamp/www/, so /wamp/www/site1 and /wamp/www/site2. I've found example of how to put them into the http.conf file but I'm not sure where they should go and the best ways of doing it.

I'm also, eventually, hoping that I can store the files in a directory outside of the www folder, for example on another disk.

Can anybody help or suggest a sample .conf file, or resources?

share|improve this question
up vote 1 down vote accepted

If you are using the wamp package from Then in your httpd.conf file, you will need to make sure to uncomment the line that says:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

make sure it looks like that.

Then go to the extra folder and edit the httpd-vhosts.conf file and add entries like this:

# Use name-based virtual hosting.
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\site1"


<VirtualHost *:80>
DocumentRoot "C:\wamp\www\site2"

As for storing the www files in another directory, you will find that in the httpd.conf file:

DocumentRoot "c:/wamp/www/"

Hope that helps.

share|improve this answer
Thanks for the assistance, made some progress but still having difficulty. I've not had any luck in setting up the reidrection, as it were. I've got site1.webserver and site2.webserver but when I try to type it into the address bar of another computer on my LAN it says the page cannot be displayed. Am I missing something or does it not work like this? – tombull89 Nov 8 '10 at 20:58
I must have missed the part about this being on your home server. Are these sites going to be ran as subdomains for a .com? Then you will also need to create host A records on the dns server that contols your domain name. With virtual hosts you can either specify and to point to the same machine. You can also have and point to the same machine. If this is just a home server for development and testing, then you can reach the different sites on the lan with machinename/site1 or machinename/site2 – lysdexic Nov 9 '10 at 6:29
Just got back into looking at this after I lost the VM with the settings it. Worked a treat, thanks very much. – tombull89 Jan 25 '11 at 19:07

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.