View Single Post
Old 15th May 2010, 02:20
apoana apoana is offline
Junior Member
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 5 Times in 2 Posts
Default automatic temporary URL for new sites

This is not heavly tested, but, it's an hack to have an temporary URL for a new site/domain.

Please, ready this:

1) Tested on multi domain setup
2) server hosting sites have the name - in this example:
3) You need to alter the DNS provider for
4) Don't blame me for problens
5) All temporary site URL will become in this example

Let's go:

1) add in you master site (or hosting site) DNS an entry like this:

*.vsite.isp01-ww1.myhost      Alias (CNAME)     Default       isp01-ww1.myhost.

*.vsite.isp01-ww1.myhost      A     Default
2) edit "/usr/local/ispconfig/server/plugins-available/" - in the server where the apache server hosting is running

3) Find in the above script:

PHP Code:
// begin a new ServerAlias line after 30 alias domains
foreach($server_alias as $tmp_alias) {
$n 30 == 0$server_alias_str .= "\n    ServerAlias ";
$server_alias_str .= $tmp_alias;

4) Change to:

PHP Code:
foreach($server_alias as $tmp_alias) {
$n 30 == 0$server_alias_str .= "\n    ServerAlias ";
$daliases explode(" "trim($tmp_alias));
$daliases as $dalias) {
        if (
trim($dalias) != "") {
$server_alias_str .=  trim($dalias) . " " trim($dalias) . ".vsite." trim($conf['serverconfig']['server']['hostname']) . " ";

5) Save the file

6) Now, every time you add an new site or alias site, ISPCONFIG generate an apache configuration like:


and this allow your client to access an new domain/site in ISPCONFIG without need to change the DNS pointing for the new site/domain. This is done using URL, as in case of this example.


1) Display in cleint area where to access new site using the temporary URL
Reply With Quote
Sponsored Links