Forums / Install & configuration / setting ezpublish up to run multiple sites (please help!)

setting ezpublish up to run multiple sites (please help!)

Author Message

William Gourlie

Friday 04 June 2004 8:06:43 am

I have downloaded ez publish 3.4 and will be installing it pending an answer to my question. I would like it to be set up to run multiple websites, and need to know if there are any special considerations i need to be aware of in the process.

I set up a temporary domain to set it up (freebsd server) cms.domainname.com, and last time i installed it (3.4 beta 2) it gave me an error saying that it wasnt running in virtual host mode. It was in fact an apache virtual host, so I wasnt sure what that meant.

One of my main concerns is that I dont fully understand how the CMS software knows which website it is supposed to display. Each virtual host would point to the ezpublish directory, im guessing the CMS software reads the http header and differentiates, but i would like to know for sure, because the better I understand it, the less of a chance there is of me messing it up.

Thanks in advance for any help

-Brian

Lazaro Ferreira

Friday 04 June 2004 9:54:05 am

Hi,

First, EZP have three setup types:

URL setup that means having site's URL like :

http://mydomain.com/myfirstsite
http://mydomain.com/mysecondsite

Hostname Setup that means having site's URL like :

http://myfirstsite.mydomain.com
http://mysecondsite.mydomain.com

Last, Port Setup that means having site's URL lik :

http://mydomain.com:80   //uses port 80 for your first site
http://mydomain.com:81

//uses port 81 for your second site

Basically you will need to configure at least three configuration files :
1) settings/override/site.ini.append
2) settings/siteaccess/myfirstsite/site.ini.append
3) settings/siteaccess/mysecondsite/site.ini.append

First, you will need to configure file number 1 above, for hostname setup settings could be like this :

[SiteSettings]
DefaultAccess=myfirstsite
SiteList[]=myfirstsite
SiteList[]=mysecondsite

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=myfirstsite
AvailableSiteAccessList[]=mysecondsite
MatchOrder=host
HostMatchMapItems[]=myfirstsite.mydomain.com;myfirstsite
HostMatchMapItems[]=mysecondsite.mydomain.com;mysecondsite

Note the two last lines of code above, for EZP it does the trick of linking your site ( siteaccess) to your domain or subdomain

On the other hand, you will need to configure files 2 and 3 above (one file for each site that you want at your multiple site setup), assuming this is for 'myfirstsite', you will have:

[DatabaseSettings]
...                    //Here myfirstsite database access data
[SiteSettings]
SiteName= Title of myfirstsite 
SiteURL=myfirstsite.mydomain.com
                      //Other necessary stuff
[DesignSettings]
...                   //myfirstsite templates folder ( .tpl, .css files)
[RegionalSettings]
...                   //myfirstsite primary language settings (English or French or ...)
[FileSettings]
...                   //where are myfirstsite files, cache, etc              

In conclusion, siteaccess is the EZP mechanism to have multiple sites sharing same EZP installation, regarding Apache web server setup take a look at
http://ez.no/ez_publish/documentation/installation/virtual_host_setup

Lazaro
...
http://www.mzbusiness.com

 

Lazaro
http://www.mzbusiness.com

William Gourlie

Friday 04 June 2004 11:45:23 am

Is it possible to have multiple sites running off the same ezpublish code that each have their own domain name?

William Gourlie

Monday 07 June 2004 3:30:31 pm

Ok, so I have my settings set up like this

[SiteSettings]
DefaultAccess=website
SiteList[]=website
SiteList[]=admin_website

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=website
AvailableSiteAccessList[]=admin_website
MatchOrder=host
HostMatchMapItems[]=website.com;website
HostMatchMapItems[]=admin.website.com;admin_website

however, when i go to admin.website.com, it takes me to the normal user website. Any idea why it might be doing this?

Lazaro Ferreira

Tuesday 08 June 2004 8:49:06 am

Hi,

check the following settings at your admin siteaccess site.ini.append... file

[SiteSettings]
SiteURL=admin.yourdomain

[SiteAccessSettings]
RequireUserLogin=true

[DesignSettings]
SiteDesign=admin

Lazaro

Lazaro
http://www.mzbusiness.com

William Gourlie

Tuesday 08 June 2004 9:46:06 am

Yep, checked those, they are correct. Maybe it has something to do with how apache is set up? I have the virtual host directive for the CMS (using the link you posted) and have Server Aliases set up for each different site, which at this point is only the website.com and admin.website.com. Problem is, any domain name that matches the servername or serveralias directive automatically goes to the default site on ezpublish.

I really appreciate your help, cant wait to have this figured out!

-Brian

William Gourlie

Tuesday 08 June 2004 2:25:56 pm

well, got to the admin site, but only because I changed the DefaultAccess directive to the admin site. For some reason it doesnt seem to be identifying the host name.

Lazaro Ferreira

Thursday 10 June 2004 3:15:31 am

Hi,

Turn On your debug output, and take a look at debug information

Are all of your permissions right (check settings,var,design permissions) ?

Lazaro

Lazaro
http://www.mzbusiness.com

William Gourlie

Thursday 10 June 2004 1:40:47 pm

reinstalled it, and it works. ARGHH! oh well, atleast its working now. Thanks for your help.

Valentin Svelland

Friday 11 June 2004 7:14:57 am

I'm also looking for some good feedback on this question. I'm planning to set up about 10 different sites with their own domains, all pointing to different siteaccesses on the same server and installation of v.3.4.

Daniel Beyer wrote a good article on this subject:
http://www.ez.no/community/forum/general/important_multiple_sites_with_multiple_urls_with_the_same_installation

His reply is good, but if someone is else is also doing multiple sites and domains on the same v.3.4 eZ installation, and have hints and tips as to how to set this up in the best way - please comment. Also with regards to contentstructuring and permissions..

Regards,
Valentin - Norway.

Siniša Šehović

Tuesday 23 November 2004 6:07:28 am

If you have one pc and need 2 or more sites to be on then you have to
setup apache and virtualhost directive in httpd.conf file.

Also need to make hosts file with IP address and description (that's for winblows important if you don't set it right when accessing admin.yourhost.com you will be redirected to www.yourhost.com)

Here is example of httpd.conf on winblows :-)

NameVirtualHost www.myhost.org

# eZ publish releated stuff

<VirtualHost www.myhost.org>
    <Directory d:/wwwroot/ezdemo>
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    ServerName www.myhost.org
    ServerAdmin [email protected]
    DocumentRoot "d:\wwwroot\ezdemo"
    
    RewriteEngine On
    RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons|^/share/pic).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php

</VirtualHost>

<VirtualHost admin.myhost.org>
    <Directory d:/wwwroot/ezdemo>
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    ServerName admin.myhost.org
    ServerAdmin [email protected]
    DocumentRoot "d:\wwwroot\ezdemo"
    
    RewriteEngine On
    RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons|^/share/pic).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php

</VirtualHost>

ServerRoot "d:\eZpublish\apache"
# eZ publish releated stuff END

Don't forget to put this into hosts file:

#
127.0.0.1       www.myhost.org
127.0.0.1       admin.myhost.org
#

Hope this would help you!

Sinisa

---
If at first you don't succeed, look in the trash for the instructions.

Johannes Lachman

Thursday 08 November 2007 3:45:06 am

Where is the hosts file? :-)

Matthew Carroll

Friday 09 November 2007 11:34:24 am

http://en.wikipedia.org/wiki/Hosts_file

http://carroll.org.uk