Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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: isp01-ww1.myhost.com
3) You need to alter the DNS provider for myhost.com
4) Don't blame me for problens
5) All temporary site URL will become yoursite.vsite.isp01-ww1.myhost.com 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/apache2_plugin.inc.php" - 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:

ServerAlias www.newdomain.com www.newdomain.com.vsite.isp01-ww1.myhost.com

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 www.newdomain.com.vsite.isp01-ww1.myhost.com, as in case of this example.


1) Display in cleint area where to access new site using the temporary URL
Reply With Quote
The Following User Says Thank You to apoana For This Useful Post:
falko (15th May 2010)
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Hardy chrooted bind9 fails to start Djamu Server Operation 35 21st April 2010 09:28
ISPconfig temporary URL mcrider General 1 30th September 2008 01:00
Can you Setup sites using URL instead of IP Address jflesher General 1 21st September 2007 00:58

All times are GMT +2. The time now is 15:08.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.