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@myhost.org
    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@myhost.org
    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

eZ debug

Timing: Jan 18 2025 10:27:29
Script start
Timing: Jan 18 2025 10:27:29
Module start 'content'
Timing: Jan 18 2025 10:27:30
Module end 'content'
Timing: Jan 18 2025 10:27:30
Script end

Main resources:

Total runtime1.1093 sec
Peak memory usage4,096.0000 KB
Database Queries232

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.1094180.8047
Module start 'content' 0.00720.9852 769.9141821.6172
Module end 'content' 0.99230.1169 1,591.5313353.2969
Script end 1.1093  1,944.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3696210.0002
Check MTime0.00160.1430210.0001
Mysql Total
Database connection0.00110.101510.0011
Mysqli_queries1.009290.97752320.0044
Looping result0.00240.21672300.0000
Template Total1.080397.420.5401
Template load0.00200.175920.0010
Template processing1.078397.203220.5391
Template load and register function0.00030.022610.0003
states
state_id_array0.00140.130110.0014
state_identifier_array0.00140.122520.0007
Override
Cache load0.00180.1639860.0000
Sytem overhead
Fetch class attribute can translate value0.00170.148970.0002
Fetch class attribute name0.00110.0958160.0001
XML
Image XML parsing0.00620.559770.0009
class_abstraction
Instantiating content class attribute0.00000.0022160.0000
General
dbfile0.00690.6241380.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
28content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 63
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs