Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to run multiple sites on my ubuntu machine. I know that I can achieve this by using virtual host configuration of the apache where servername = 'siteabc.com' in the configuration of siteabc and servername = 'sitexyz.com' in the configuration of sitexyz where siteabc.com & sitexyz both point to same IP address. My questions is that how can I create these siteabc.com & sitexyz.com name-servers on ubuntu so that both of them are ping-able from outside my network?

Thanks, Daulat

share|improve this question

migrated from stackoverflow.com Oct 4 '10 at 10:18

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

2 Answers 2

Correct me if I am wrong but if you set the "A" dns record of site1.com and site2.com to your IP, then you can use the apache handler and also if your ip is pingable itself, site1.com and site2.com will be also pingable.

share|improve this answer

You need to get whoever manages your DNS to add some records for you. You can request either A records or CNAMEs, it's up to you. There are arguments for and against both I guess

Assuming your public IP address of your webserver is 192.168.0.1*, then your DNS would look like (assuming BIND is used):

[....]
site1.exmaple.    IN    A     192.168.0.1
site2.exmaple.    IN    A     192.168.0.1
site3.exmaple.    IN    A     192.168.0.1
[....]

Or, if you went with CNAMEs, then it would be:

[....]
site1.example.    IN    A     192.168.0.1
site2.example.    IN    CNAME site1.example.
site3.example.    IN    CNAME site1.example.
[....]

It sounds like you've got your DNS sorted within your network already

*192.168.0.1 is part of an IP address range that isn't routed on the public internet. Please substitute this address with the actual public IP of your web server

share|improve this answer

Your Answer

 
discard

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