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 15 2025 08:23:25
Script start
Timing: Jan 15 2025 08:23:25
Module start 'layout'
Timing: Jan 15 2025 08:23:25
Module start 'content'
Timing: Jan 15 2025 08:23:27
Module end 'content'
Timing: Jan 15 2025 08:23:27
Script end

Main resources:

Total runtime1.2253 sec
Peak memory usage6,144.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 686.8984183.7031
Module start 'layout' 0.00690.0034 870.601652.6016
Module start 'content' 0.01031.2133 923.20311,854.0859
Module end 'content' 1.22360.0016 2,777.289168.5078
Script end 1.2252  2,845.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00550.4480160.0003
Check MTime0.00130.1082160.0001
Mysql Total
Database connection0.00070.058810.0007
Mysqli_queries1.159594.6303650.0178
Looping result0.00060.0479630.0000
Template Total1.187496.920.5937
Template load0.00360.297120.0018
Template processing1.183896.610720.5919
Template load and register function0.00130.107910.0013
states
state_id_array0.00110.087910.0011
state_identifier_array0.00160.127320.0008
Override
Cache load0.00320.2600230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.048930.0002
Fetch class attribute name0.00190.156460.0003
XML
Image XML parsing0.00280.232030.0009
class_abstraction
Instantiating content class attribute0.00000.001480.0000
General
dbfile0.00260.2148170.0002
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.0002 secs