Forums / Setup & design / Multi-level subdomains and host matching

Multi-level subdomains and host matching

Author Message

Sander van den Akker

Monday 20 June 2011 2:46:58 am

Hi! I am having trouble getting the host-siteaccess mapping to work on one of my projects and I can't find any information about this yet, so I thought I'll ask it here, maybe someone knows the solution?

I have a site with 2 siteaccesses on subdomain.acceptance.domain.com and admin.subdomain.acceptance.domain.com (yes I know... too long!). My site.ini settingsare as follows:

MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=subdomain.acceptance.domain.com;your_public_siteaccess
HostMatchMapItems[]=admin.subdomain.acceptance.domain.com;your_admin_siteaccess

When I try one of the above url's I end up getting a fatal error (attempts to connect to localhost with user root and no pass). This is because there is no host match. Is there support for this kind of setup, and if so, how should I configure it?

eZ Publish certified developer
http://auth.ez.no/certification/verify/392313

Carlos Revillo

Monday 20 June 2011 3:15:53 am

Iin your code it seems to be a lack of siteaccess mapping. i mean, you need to map domains with siteaccess.

i see this in your code

HostMatchMapItems[]=subdomain.acceptance.domain.com
HostMatchMapItems[]=admin.subdomain.acceptance.domain.com

but it should be something like

HostMatchMapItems[]=subdomain.acceptance.domain.com;your_public_siteaccess
HostMatchMapItems[]=admin.subdomain.acceptance.domain.com;your_admin_siteaccess

 

Sander van den Akker

Monday 20 June 2011 8:05:24 am

I forgot to add those in my post, but they are in my site.ini. I have corrected my post, sorry about that!

eZ Publish certified developer
http://auth.ez.no/certification/verify/392313

Roman Hutterer

Monday 20 June 2011 12:59:21 pm

are you sure the error message is not from database ?

Sander van den Akker

Tuesday 21 June 2011 2:07:50 am

Yes, when I add the same siteaccess with a different hostname (i.e. test.domain.com) it works.

eZ Publish certified developer
http://auth.ez.no/certification/verify/392313

eZ debug

Timing: Jan 17 2025 22:46:38
Script start
Timing: Jan 17 2025 22:46:38
Module start 'content'
Timing: Jan 17 2025 22:46:39
Module end 'content'
Timing: Jan 17 2025 22:46:39
Script end

Main resources:

Total runtime0.7310 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.9609180.8203
Module start 'content' 0.00620.6247 769.7813598.8750
Module end 'content' 0.63090.1000 1,368.6563337.3672
Script end 0.7309  1,706.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5383210.0002
Check MTime0.00140.1928210.0001
Mysql Total
Database connection0.00080.110510.0008
Mysqli_queries0.662990.69382020.0033
Looping result0.00190.25862000.0000
Template Total0.705296.520.3526
Template load0.00180.246520.0009
Template processing0.703496.225320.3517
Template load and register function0.00010.016010.0001
states
state_id_array0.00190.260110.0019
state_identifier_array0.00080.114420.0004
Override
Cache load0.00160.2217230.0001
Sytem overhead
Fetch class attribute can translate value0.00140.193340.0004
Fetch class attribute name0.00110.145960.0002
XML
Image XML parsing0.00110.147540.0003
class_abstraction
Instantiating content class attribute0.00000.002880.0000
General
dbfile0.00210.2806280.0001
String conversion0.00000.001030.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs