I was hoping someone could explain the best way to change "primary domain" from site.com to www.site.com. My first attempt was to clone the site to a backup(backup.site.com), delete "site.com", and then clone back to "www.site.com". Well it totally didn't work, and the site stopped working (was getting the nginx page)

After a total server backup to just get the site live again, I tried compairing the vhost files and the only difference was "nginx_octopus_include.conf" instead of "nginx_advanced_include.conf" - I don't know if this makes any difference.

I realize this could be a general Aegir question, if the config is no different in boa, I can take my question there. Thanks!

Comments

omega8cc’s picture

To redirect foo.com to www.foo.com you need to use www.foo.com as a main domain name for the site created in Aegir and enable standard redirect. It will add foo.com as an alias automatically.

If your site is already created with foo.com, you can't rename it directly to www.foo.com, however. It is because www.foo.com alias is already "taken" so it is a classic chicken/egg syndrome.

You will need to rename the site to anything.foo.com first and then back to www.foo.com, plus enable redirect.

Now any visit to foo.com will cause 301 redirect to www.foo.com

leevh’s picture

Thanks for the reply Omega. When you say "rename the site" I assume that's a clone operation in Aegir? If so, I did exactly that already with bad results. I'll try again.

Is there a reason some of my sites have "nginx_octopus_include.conf" instead of "nginx_advanced_include.conf" in the vhost files?

thanks!

omega8cc’s picture

No, Rename is a "hidden" feature of Migrate task, not Clone. Just use Migrate and enter new domain name, without changing the platform.

Any site created or verified after upgrade to BOA-2.0.2 will use new Nginx config templates: nginx_modern_include.conf for PHP 5.3, nginx_octopus_include.conf for PHP 5.2 and nginx_legacy_include.conf for D5 sites and servers without upload progress built-in.

The nginx_advanced_include.conf and nginx_simple_include.conf are deprecated, but still maintained for sites not verified after the upgrade, so nginx_advanced_include.conf is the same as nginx_octopus_include.conf and nginx_simple_include.conf is the same as nginx_legacy_include.conf.

leevh’s picture

You are wonderful! Thank you so much once again. I will give that a try this weekend, and thank you for the info on the conf files as well! :)

omega8cc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.