Ægir on Ubuntu Server - DNS question

Hello,

I've installed Ægir into Ubuntu server ( latest version, Jaunty? running in VMware on OSX), using the install script. Ægir installed and configured fine and i can create sites, but i'm having trouble viewing the sites because of ( what i'm guessing is) my DNS settings.

I can login to Ægir fine, its running on ubuntu.local

For a test i setup a site: nio.local

Ægir set it up, but when i click on "Visit site" it can't find the site, I know its something to do with the DNS and i installed
WEBMIN http://www.webmin.com/ and tried to add nio.local to the dns settings but so far i'm having no luck.

I wanted to install it on a virtual server first so i could learn my way around before rolling it out on our dedicated hosting. Any help with setting up the DNS correctly would be much appreciated.

Thanks

Login to post comments

Setting up DNS can be a big

mig5's picture
mig5 - Thu, 2009-10-08 07:19

Setting up DNS can be a big job if you're not familiar with DNS in general.

You essentially need to set up a 'zone' within which, you can either create an 'A' or 'CNAME' record for nio.local to point to your server.

But you have to do that for each site you create. Instead, it is faster to create a wildcard DNS entry *.local that points to localhost, and then anything.local will resolve, and you never have to deal with it again.

If you know you are only going to be setting up nio.local and, say, three other sites, in your local environment, you can hardcode these entries into /etc/hosts, which effectively is checked first before a DNS lookup is attempted.

So in /etc/hosts you could put

( ip address of ubuntu.local ) nio.local
( ip address of ubuntu.local ) merro.local
( ip address of ubuntu.local ) mig5isawesome.local

(minus the brackets)

And they should all then resolve.

Have a read about Wildcard DNS on wikipedia.

Unless you're familiar with DNS syntax and concepts, including how to make your system query the local nameserver instead of your ISP's in the /etc/resolv.conf and stuff like that, I'd recommend you take the slightly more time-consuming-but-easier approach of adding entries into /etc/hosts like above.

Good luck!


Thanks for the quick reply!

merro - Thu, 2009-10-08 09:11

Adding to /etc/hosts worked like a charm. I should have thought of that, but i was intent on trying getting the DNS to work... which really shouldn't be a priority on this test server.

When i set it up on our dedicated hosting (netregistry) will it ( setting up the DNS ) be as simple as: Setup the domain in the netregistry console, point it to our nameservers and then add a new client with that domain in Ægir?

Thanks again for the quick and detailed response, I'm sure i'll have more questions as i start playing : )


When i set it up on our

mig5's picture
mig5 - Thu, 2009-10-08 09:53

When i set it up on our dedicated hosting (netregistry) will it ( setting up the DNS ) be as simple as: Setup the domain in the netregistry console, point it to our nameservers and then add a new client with that domain in Ægir?

Well, that's not really 'setting up the DNS', that's creating a domain and delegating authoritative nameservers for the domain, in the registrar.

The key part here, is 'our nameservers' - these are the ones that need to have a zone resolving the domain to an IP, and to do so authoritatively.

And it's here that if you need a wildcard domain, you define it in the zone file.

If you have a site in aegir with domain 'example.com', and you've set up authoritative nameservers to answer requests for example.com with '111.222.333.444' IP, and your webserver has this IP, then the site will be served by Apache, thanks to the vhost configuration file that Aegir generates for the site.

Hope this answers your question.