Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

My PC has a configuration to work as a server. It has quad core processor with 8GB RAM. So I made it a server.

Now i want to know, how can I link the domain names to various folders in my WAMP.

At present, when I am calling my IP address e.g. 123.234.345.456, I get index file from C:/wamp/www/.

But I want to forward e.g. to folder C:/wamp/www/example and to folder C:/wamp/www/test

Does anyone have idea how to do this? And what should I do in my domain provider's controls, so that they can fetch data from my server, without changing URL.

share|improve this question

closed as off topic by RobM, Shane Madden, Ward, Magellan, Scott Pack Nov 2 '12 at 1:25

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

What's your Apache configuration currently? – Shane Madden May 3 '12 at 16:51
I didn't understand. I can mould the settings to anything. This is my own Home Server. – Thompson May 3 '12 at 17:14
up vote 1 down vote accepted

You would use name-based virtual hosting and then define subdomains with your DNS provider. You must set up an additional DNS name and virtual host for each domain name (including subdomains) you wish to use.

With apache, I don't believe there is a way to make this mapping arbitrary and ad-hoc; each domain is designed to represent a site, not a directory within a site.

share|improve this answer
If I create folders for each domain or subdomain in the www folder, will it be fine then? Anyways, how I can get the DNS of my home server. I have a line from Home Internet Provider, and I have managed it to make my PC as Server. I also have static IP. Now I just want to configure the Domain provider's box where I can set the domain hosting from my server. For example, A Name or CNAME or something like that. – Thompson May 3 '12 at 17:13
The link I gave to the documentation gives you all the steps you need to follow in your server configuration. Creating the folder is not enough; you must also configure a virtual host as documented there. Then, yes, you must add either an A or CNAME record. CNAME (to your "main" DNS name) is probably more convenient because if you get notice that your IP is changing you can just update one A record instead of several. – Falcon Momot May 3 '12 at 17:22

Wouldn't a reverse proxy set up in mod_proxy cover this? Although as pointed out for, sanity's sake you'll probably want to run a separate Apache for each host header (www, test, etc.).

I think the sticky point will likely be getting (redirected) links on the server working properly. Here's a pretty complete explanation.

Also, you'll want to confirm that your ISP is set to forward * to port 80 on your IP number and not just forward

share|improve this answer

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