ed
Member
Registered: 10th Sep 03
User status: Offline
|
For development I usually modify the hosts file on my computer to route domain names to my local webserver. This works fine, but for a project I'm working on now I need to be able to set wildcard subdomains. You can't use wildcards in the hosts file, so I guess I need to run a local DNS?
Anyone know where to start when doing this on OSX? I basically need to be able to route *.development.local to 127.0.0.1.
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
BINDs available under OSX, just a case of creating local 'TLD' zones and making sure you have a forwarder (ISPs DNS) setup for all other domains.
This gives an idea of BIND config - http://www.madboa.com/geek/soho-bind/
[Edited on 02-05-2012 by Dom]
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Thanks Dom - had it working using MacPorts and DNSMASQ but it's no good. You have to setup DNSMASQ with a LAN IP address which is no good as I work in a number of places with a number of different IP's.
I'll give BINDs a go
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
Unrelated I know but I'd cry if I lost my HOSTS file, it's stupidly long as I admin loads of domans on an off-domain laptop
|
noshua
Member
Registered: 19th Nov 08
User status: Offline
|
Pow maybe You should Dropbox it to be safe! Run a command script to copy it to Dropbox everyone you logon windows
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup
|
John
Member
Registered: 30th Jun 03
User status: Offline
|
What do you need everything in HOSTS for Pow?
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
quote: Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup
Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by ed
Thanks Dom - had it working using MacPorts and DNSMASQ but it's no good. You have to setup DNSMASQ with a LAN IP address which is no good as I work in a number of places with a number of different IP's.
I'll give BINDs a go
IIRC, in the DNSMASQ configs you should have been able to bind the listening address to the localhost something like 'listening-address=127.0.0.1'. And it's probably easier to setup than BIND, although you'd have had to setup the wildcards separately (has a weird arse way of doing it from what i can remember) to the hosts file.
Have a look - http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/ AND http://daniel.hahler.de/easy-dns-wildcard-setup-for-local-domains-using-dnsmasq
[Edited on 03-05-2012 by Dom]
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
I'll have another look then, I tried setting it up to 127.0.0.1 and couldn't get on the web afterwards. I'm a bit of a n00b though so I think I must have done it wrong!
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by ed
I'll have another look then, I tried setting it up to 127.0.0.1 and couldn't get on the web afterwards. I'm a bit of a n00b though so I think I must have done it wrong!
Again you'll need to add forwarders (forwards DNS requests to another DNS server if it can't find the zones/lookup locally), so have a look at the resolv.conf (or resolv.dnsmasq for DNSMASQ) file and enter your usual DNS IPs there.
First link i posted gives you a decent run-through of the setup. As said, DNSMASQ usually uses the hosts file but you'll have to follow the second link for using wildcards.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Brilliant - thanks
All this effort to make a nice node.js environment. Node.js is fantastic though!
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
quote: Originally posted by John
What do you need everything in HOSTS for Pow?
Mainly for Hyper-V snap in but other little bits and bobs too. I manage about 7 Hyper-V servers using my off domain laptop and HVRemote
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
quote: Originally posted by ed
quote: Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup
Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!
I just don't like the idea of someone else having my data!
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by pow
quote: Originally posted by ed
quote: Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup
Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!
I just don't like the idea of someone else having my data!
Encrypt it? Or use a proper 'cloud' based backup provider, like Backblaze, which does it before it hits their servers (only you have access).
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
I can recommend Backblaze - just sits there in the background looking after your entire HDD without any fuss
|
John
Member
Registered: 30th Jun 03
User status: Offline
|
quote: Originally posted by pow
quote: Originally posted by John
What do you need everything in HOSTS for Pow?
Mainly for Hyper-V snap in but other little bits and bobs too. I manage about 7 Hyper-V servers using my off domain laptop and HVRemote
Was just wondering because I manage loads of networks have never needed it, don't use Hyper-V though.
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
It's mainly Hyper-V but Sophos Administration is another thing that requires it...
|
John
Member
Registered: 30th Jun 03
User status: Offline
|
Fair do's, I really should get a look at Hyper-V anyway.
Handy having a server running, can just use that for DNS if need be. (I know a server is not a requirement for DNS).
|