Monday 14 April 2008 6:53:16 am
Hi. I will try.
If you have used the wizard installation, maybe you will have two "siteaccess" configured. Something like
http://www.yourdomain.com/plain_site
and http://www.yourdomain.com/plain_site_admin If you look at your settings/override/site.ini.append.php you'll probably have something like
[SiteAccessSettings]
AvailableSiteAccessList[]=plain_site
AvailableSiteAccessList[]=plain_site_admin
....
MatchOrder=uri
The trick is to change that MatchOrder value to host and map domains to any of your siteaccess. Let's suppose you need something like www.yourdomain.com as your public site, and something like admin.yourdomain.com for your admin interface. you will have to do something like
[SiteAccessSettings]
AvailableSiteAccessList[]=plain_site
AvailableSiteAccessList[]=plain_site_admin
....
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=www.yourdamin.com;plain_site
HostMatchMapItems[]=admin.yourdomain.com;plain_site_admin
Of course you will have to ask your hosting provider to create a dns entry for the admin subdomain, and setting document root for it to the same document root as your public site. eZ will know wich settings, templates and all stuff to serve depending of the domain the visitor types in this browser. If you need a new subdomain, you will have to create another siteaccess to map it. Let's suppose you need site1.yourdomain.com. Your settings/override/site.ini.append.php will have to look like
[SiteAccessSettings]
AvailableSiteAccessList[]=plain_site
AvailableSiteAccessList[]=plain_site_admin
AvailableSiteAccessList[]=site1
....
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=www.yourdamin.com;plain_site
HostMatchMapItems[]=admin.yourdomain.com;plain_site_admin
HostMatchMapItems[]=site1.yourdomain.com;site1
and you will have to create settings for this new siteaccess. For this, you can duplicate settings/siteaccess/plain_site to settings/siteaccess/site1. In this new folder you'll change all the settings needed to look for another design for example.
Following with your questions, the answers is that it depends on what you want. I mean, you can create several databases (one per subdomain) of you can use only one for all of them.
To separate content between domains, maybe you can have a look at content.ini.append.php you can change rootnode in your settings/siteaccess/site1/content.ini.append.php, so, only nodes in this "leaf" of the tree node will be shown for that siteaccess... Hope it helps.
|