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. |
just add XXXXX.site.com to site.com aliases,
DNS record will create automaticaly. |
Quote:
I asked to do it: 1) Automatically. 2) Done for any subdomain possible. Thank you. |
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.