Subdomain setup

Author Message

David Jones

Thursday 15 February 2007 12:00:21 am

I need to set-up up some subdomains in ezp and I'm not sure how to do it.

I have several sites based on /foldername

ie domain.com/site1; domain.com/site2

I want to set up

site1.domain.com -- > domain.com/site1
site2.domain.com -- > domain.com/site2

I assume that this is possible but I can't find anything on the forums about it.

Thanks in advanced.

Kristof Coomans

Thursday 15 February 2007 12:24:46 am

See
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/matchorder
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/hostmatchtype

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

David Jones

Thursday 15 February 2007 12:36:19 am

thanks Kristof but I don't want to map the subdomains to siteaccess.

I only have one public site access.
I want to map them to locations within that access.

Maybe my description was confusing. Maybe this is better

folder1.domain.com -- > domain.com/folder1
folder2.domain.com -- > domain.com/folder2

Xavier Serna

Thursday 15 February 2007 12:55:39 am

I think you are talking about url redirection, and that can be made with mod_rewrite in apache.
You can find more info at: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

also, as Kristof said, you can use HostMatchType rule like this

Regexp matching

HostMatchType=regexp
HostMatchRegexp=^(.+)\.example\.com
HostMatchRegexpItem=1

This regexp setup uses the regular expression ^(.+)\.example\.com to match anything in front of .example.com. The first match is set up to hold the siteaccess. E.g the hostname test.example.com yields the siteaccess test.

from: http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/hostmatchtype

obviously you need to setup your webserver to accept requests for site1.domain.com and so on.

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

David Jones

Thursday 15 February 2007 1:55:12 pm

Thanks,

Normally in apache config you can do something like

<VirtualHost *>
ServerName subdomain.domain.com
DocumentRoot /home/httpd/htdocs/subdomain/
</VirtualHost>

How do I achieve this in ezp?

I only have one site access.

domain/siteacces/folder
domain/siteaccess/folder 2

I want my sub domains to point to different folders.

Am I making sense yet?

I really appreciate your time.

Thanks again.

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 16:27:58
Script start
Timing: Jan 18 2025 16:27:58
Module start 'layout'
Timing: Jan 18 2025 16:27:58
Module start 'content'
Timing: Jan 18 2025 16:27:59
Module end 'content'
Timing: Jan 18 2025 16:27:59
Script end

Main resources:

Total runtime0.8664 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 587.9063152.6250
Module start 'layout' 0.00500.0026 740.531339.4453
Module start 'content' 0.00760.8572 779.9766604.8672
Module end 'content' 0.86480.0016 1,384.843812.1797
Script end 0.8664  1,397.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3969160.0002
Check MTime0.00140.1620160.0001
Mysql Total
Database connection0.00060.072310.0006
Mysqli_queries0.807293.1640650.0124
Looping result0.00060.0657630.0000
Template Total0.840297.020.4201
Template load0.00180.203820.0009
Template processing0.838596.771920.4192
Template load and register function0.00010.015610.0001
states
state_id_array0.00070.085710.0007
state_identifier_array0.00090.099620.0004
Override
Cache load0.00150.1784440.0000
Sytem overhead
Fetch class attribute can translate value0.00050.055230.0002
Fetch class attribute name0.00090.108370.0001
XML
Image XML parsing0.00110.122530.0004
class_abstraction
Instantiating content class attribute0.00000.001770.0000
General
dbfile0.00090.1059220.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs