Forums / Install & configuration / Subdomain setup

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.

eZ debug

Timing: Jan 31 2025 01:17:41
Script start
Timing: Jan 31 2025 01:17:41
Module start 'content'
Timing: Jan 31 2025 01:17:41
Module end 'content'
Timing: Jan 31 2025 01:17:41
Script end

Main resources:

Total runtime0.2055 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.9219370.3047
Module start 'content' 0.00700.0166 958.22661,005.6406
Module end 'content' 0.02370.1818 1,963.86723,893.7656
Script end 0.2055  5,857.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00502.4295200.0002
Check MTime0.00150.7238200.0001
Mysql Total
Database connection0.00070.357610.0007
Mysqli_queries0.101749.45601410.0007
Looping result0.00140.66131390.0000
Template Total0.181388.210.1813
Template load0.00090.451010.0009
Template processing0.180487.774910.1804
Override
Cache load0.00060.312810.0006
Sytem overhead
Fetch class attribute can translate value0.00211.042710.0021
XML
Image XML parsing0.00030.148410.0003
General
dbfile0.00723.5099200.0004
String conversion0.00000.003530.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs