Share » Forums » Install & configuration » Multi doman website

Multi doman website

Multi doman website

Friday 20 June 2008 9:15:58 pm - 5 replies

Author Message

Greg McAvoy-Jensen

Friday 20 June 2008 9:41:27 pm

I wouldn't set up new directories for each new domain (for example, /home/mydomain.com/public_html/mydomain1.com). Everything should point to index.html in the root eZ Publish directory; let eZ Publish figure things out from there.

The way to differentiate multiple domains on one eZ Publish installation is to use a separate "siteaccess" for each domain. So in settings/siteaccess, add an additional directory for each site access; in each directory, put a site.ini.append.php tailored to that particular domain. It will give you the flexibility to decide whether they all use the same database and var directory.

In settings/override/site.ini.append.php, be sure each of your new siteaccesses is recognized. Also, this is where you specify which domain corresponds to which siteaccess--by use of the MatchOrder directive. If you happen to name each site access the same as the domain (without the www.), then your configuration would look like this:

[SiteAccessSettings]
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=www.mydomain.com; mydomain
HostMatchMapItems[]=www.mydomain1.com; mydomain1
HostMatchMapItems[]=www.mydomain2.com; mydomain2

Of course, you'll need to also include the admin interface.

You can read more at http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/configuration/access_methods.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

David Lafonte

Saturday 21 June 2008 9:02:30 am

So if I enter my domain www.mydomain.com.
Do I need do some web host setup?
Like apache conf file

Greg McAvoy-Jensen

Saturday 21 June 2008 9:29:57 am

You'd just need one virtual host setup for the whole set--just include something like (I'm using Apache 2):

DocumentRoot /home/mydomain.com/public_html/
    ServerName www.mydomain.com
    ServerAlias www.mydomain1.com
    ServerAlias www.mydomain2.com

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

David Lafonte

Saturday 21 June 2008 10:02:15 am

Thanks for reply
I do not have access to apache conf because i am on shared hosting
can i do something simillar in .htaccess
Thanks

Donat Fritschy

Monday 23 June 2008 9:55:57 am

Your hosting provider will most certainly define the ServerAlias directive for you.

Alternatively, you can stick with the different site roots and put this directive into the .htaccess file

Redirect / http://www.example.com/ 

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu