What information is required to map a domain name to a directory on a web server?
Asked by
ukasaka (
57)
September 16th, 2008
Observing members:
0
Composing members:
0
5 Answers
You need to edit your dns entries. You’d need to create an NS entry in your DNS settings. Of course this is all very dependent on your host. I’m also assuming you want to create a sub-domain for this, rather than your main domain. If you’re doing it for your main domain, I’d simply do a redirect.
Windows? Linux? Throws us a bone here.
Assuming it’s apache, and you already have DNS set up to point to your server, you need to add a Virtualhost directive to your httpd.conf and then restart apache. Go to apache.org and search for the “VirtualHost” directive in the docs.
Oooooo. Hadn’t even thought about the fact that he might have that level of control. Good point @Rotwang.
This article briefly explains how to use Apache’s URL rewriting engine to direct traffic for individual domains to dedicated directories all hosted by a single web server instance.
Refer to Apache’s complete mod_rewrite documentation for all details and examples.
Whoever is hosting your domain name might have this option in the control panel for your domain. This is called domain masking. Where you see the option for that, just input the proper information for where your files are hosted.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.