09-01-2004, 11:02 AM | #1 |
Member
|
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. |
09-06-2004, 12:37 PM | #3 | |
Member
|
Quote:
I asked to do it: 1) Automatically. 2) Done for any subdomain possible. Thank you. |
|
09-07-2004, 05:28 AM | #4 |
ISPsystem team
Join Date: Mar 2004
Posts: 98
|
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\""); }
__________________
ISPsystem support team |
|
|