ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   Feedback & Feature Requests (http://forum.ispsystem.com//forumdisplay.php?f=9)
-   -   Problems with subdomains (http://forum.ispsystem.com//showthread.php?t=105)

bakon 09-01-2004 11:02 AM

Problems with subdomains
 
Now when you enter a subdomain that no exists of a site that exists at the server it does goes ok.
For example:
mail.site.com goes to the first site declared on Apache (perhaps not "site.com")

1) Could that entry be created automatically when a site is added at the server?

2) Could it be done for any subdomain possible, so for example:
XXXXX.site.com goes to site.com

Thank you.

Igor 09-06-2004 02:46 AM

just add XXXXX.site.com to site.com aliases,
DNS record will create automaticaly.

bakon 09-06-2004 12:37 PM

Quote:

Originally Posted by Igor
just add XXXXX.site.com to site.com aliases,
DNS record will create automaticaly.

Ok, but it has to be done for each site in the server manually (I have 140 sites in a server).

I asked to do it:
1) Automatically.
2) Done for any subdomain possible.

Thank you.

Igor 09-07-2004 05:28 AM

you can use API for add xxxxxxxx.site.com alias to all your sites

example perl script for this task:
==============================================
#!/usr/bin/perl

@SITES = `fetch -qo - "http://localhost/manager/ispmgr?out=text&func=site"`;

foreach (@SITES) {
chomp;
$name = (split(/\s/))[0];
$site = (split(/=/, $name))[1];
print "$site\n";
$info = "";
@PROP = `fetch -qo - "http://localhost/manager/ispmgr?out=text&func=site.edit&elid=$site"`;
foreach(@PROP) {
chomp;
if (/alias=/) {
$_ .= " xxxxxxxx.$site";
}
$info .= "&$_";
}
system("fetch -qo - \"http://localhost/manager/ispmgr?out=text&func=site.edit&sok=yes$info\"");
}


All times are GMT +2. The time now is 09:45 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.