I'm working on a new site, and I want to use Aegir for it (I'm already using aegir for several live sites).
The domain name of the site when launched will be www.example.com
The domain name of the site whilst I am developing it will be dev.mydomin.com
So, when I create the development site in aegir, should I create it with the domain name dev.mydomain.com, or with what will be the final domain - www.example.com ? The problem I can forsee with developing the site under the vdevelopment domain name, is that surely all the files will be stored in the directory /sites/dev.mydomin.com/files, and references to them will be embedded in nodes and blocks etc. So, when I deploy the site, all the links to files will surely be broken... or does aegir take care of that when deploying from a dev site to a production?

Comments
just use no www
Hi Tom
For both your dev and local, use example.com [no www]
Drupal's multisite feature will fall back to the example.com when it can't find the www.example.com or the dev.example.com domains.
Hi Alan, But, my local, dev,
Hi Alan,
But, my local, dev, and eventually live site will all be managed from the same aegir installation. So, in argir, I need three separate site nodes set up. I don't think I can set up 3 aegir sites, each with the example.com domain name, can I? I think the site names have to be unique...
--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.
If I'm not too wrong Aegir does some replacement
If I'm not too wrong Aegir does some replacement, at least for files table. But "there's already a module for that" although it needs some love: http://drupal.org/project/sitedir_migrate
@jonhattan Thanks for that -
@jonhattan Thanks for that - did the trick.
It would be good if that functionality existed in some capacity within Aegir - this would really help when Cloning sites to alternate dev/stage domain names, and migrating from dev to production.
--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.
aegir does modify the files dir
check provision/platform/drupal/deploy_6.inc
Adrian, yes I see
Adrian, yes I see that:
<?phpdb_query("UPDATE {files} SET filepath=replace(filepath, 'sites/%s', 'sites/%s')", $old_url, $new_url);
db_query("UPDATE {users} SET picture = replace(picture, 'sites/%s', 'sites/%s')", $old_url, $new_url);
variable_set('file_directory_path', "sites/$new_url/files");
variable_set('file_directory_temp', "sites/$new_url/files/tmp");
?>
So it will update the files table, which is cool. That sitedir_migrate module goes one step further, and actually fixes references to files in blocks and nodes.
http://drupalcode.org/viewvc/drupal/contributions/modules/sitedir_migrat...
http://drupalcode.org/viewvc/drupal/contributions/modules/sitedir_migrat...
Could that be included in provision? Or, could that be considered as potentially dangerous? It's a pretty standard query to run when you migrate a site from one domain name to another.
--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.
Pathologic
You can also use the Input Filter, Pathologic to dynamically replace URL's in
<a>and<img>tags and maybe others, to make them relative so they work between sites.Dnsmasq and aliases for dev system
Thanks for all! Here's my 2 cents.
I'm using dnsmasq on my dev desktop with a single line in /etc/dnsmasq.conf:
address=/loc/127.0.1.1(maybe 127.0.0.1, see /etc/hosts).It means I have my own .loc top-level domain, any.domain.name.loc is resolved as localhost and rendered locally by Apache & Aegir dev server.
When I make a new site that is supposed to be example.com in a mature, I give them his real domain name (example.com) and then add my local alias (in this case example.com.loc or example.loc, if it looks better).
After installation is done there is a small problem with a one-time-login link: it throws me on example.com which is not my local installation address, the worst of it is that href of the link is node/123/goto_site. But I have this link undressed in an installation log ("View" button in a task table), just copy a line starting with Login url: httр://example.com/user/reset/1/12345678blablabla.., paste it and insert an alias: httр://example.com.loc/user/reset/1/12345678blablabla...
As a result the installation in sites/example.com is accessible by alias, my files are in sites/example.com/files. So I can move this site from one server to another, adding some new aliases to access it, all files are always be in place.
Moving sites to a new domain
Moving sites to a new domain and having their forms target the old domain can often be resolved by simply clearing the cache.