Perl scripts to automatically update zone files?

Will Yardley &- at no.spam.veggiechinese.net
Mon Jun 24 17:41:16 UTC 2002


In article <af7las$fb99$1 at isrv4.isc.org>, Crazy Diamond wrote:
> 
> I have a box running apache and bind here at the University of
> Massachusetts Lowell and we want to set up apache and bind so that
> people can set up web sites automatically using virtual hosting
> through a perl script.  So, for example, say our domain name is
> abcd.com and a user creates a website, the script would automatically
> create a virtual host in apache called xyz.abcd.com.
> 
> The question to this group is, does anyone here know a PERL script
> that will automatically stop named, append the subdomain to the zone
> file i specify, and then restart the name daemon?

this is a good candidate for wildcard A records; for instance you could
put:
*  IN A 123.123.123.123

in the zone file for xyz.abcd.com.

then you just have to write the perl script to determine which name the
site was called with and serve up the appropriate data....

an example would be diary-x.com:

any A record that's not otherwise specified will return the same IP
address:

;; ANSWER SECTION:
adfasdfasdfadfs.diary-x.com. 10800 IN   A       66.33.192.129

-- 
No copies, please.
To reply privately, simply reply; don't remove anything.


More information about the bind-users mailing list