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