I have a virtual host in ubuntu with a dedicated ip. How can I make it host a domain name or several domains for example mynewdomain.co.cc. I want to point the nameserver setup of mynewdoamin.co.cc to my virtual host. How can I do that ? I already have configured a lampp apache in this virtual host. And I can access the host with ip.

Let me know if I have to clarify more.

link|improve this question
You are mixing up 2 completely different topics. Apache VHosts aren't in any way related to a DNS set up. In fact you can have have IP based VHosts, Port Based VHosts and Name based VHosts -- only the latter do absolutely need a working DNS setup. May I suggest you decide on one topic here, and post a second question with the other topic? – Server Horror Jun 8 '11 at 21:10
feedback

migrated from stackoverflow.com Jun 8 '11 at 21:01

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

You need to declare your virtual hosts in your Apache configuration. See Apache Virtual Host documentation.

link|improve this answer
yea, but don't my virtual host have to have nameserver configuration which I will set in the co.cc domain ns1 and ns2 configuration ? – rbncha Jun 8 '11 at 5:52
The DNS servers for your mynewdomain.co.cc would require A records pointing to your dedicated IP address so clients can find your host. Apache then uses the contents of the Host header sent by the client to select a virtual host to serve. – JamesA Jun 8 '11 at 6:11
that means I will need to set the ns1 and ns2 for mynewdomain.co.cc to the virtual server ip ? same ip for both ns1 and ns2 ? – rbncha Jun 8 '11 at 7:10
No you will set the ns1 and ns2 to whatever DNS you are using to host your domain. You will create an A record in that DNS to point to your virtual server ip. – JamesA Jun 8 '11 at 20:55
feedback

Your Answer

 
or
required, but never shown

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