Forums / Install & configuration / Subdomain setup
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/matchorderhttp://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
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
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/folderdomain/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.