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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:09:52
Script start
Timing: Jan 18 2025 02:09:52
Module start 'layout'
Timing: Jan 18 2025 02:09:52
Module start 'content'
Timing: Jan 18 2025 02:09:53
Module end 'content'
Timing: Jan 18 2025 02:09:53
Script end

Main resources:

Total runtime0.8790 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0469152.6406
Module start 'layout' 0.00500.0024 740.687539.4844
Module start 'content' 0.00730.8700 780.1719593.7813
Module end 'content' 0.87730.0016 1,373.953112.1250
Script end 0.8789  1,386.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3317160.0002
Check MTime0.00130.1433160.0001
Mysql Total
Database connection0.00070.083310.0007
Mysqli_queries0.824293.7761650.0127
Looping result0.00070.0817630.0000
Template Total0.853497.120.4267
Template load0.00210.240820.0011
Template processing0.851296.847020.4256
Template load and register function0.00010.012010.0001
states
state_id_array0.00090.106010.0009
state_identifier_array0.00130.146120.0006
Override
Cache load0.00170.1960230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.064330.0002
Fetch class attribute name0.00120.137460.0002
XML
Image XML parsing0.00070.074630.0002
class_abstraction
Instantiating content class attribute0.00000.002080.0000
General
dbfile0.00080.0875170.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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