HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Subdomains and Zones

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#50207 (In Topic #10940)
Avatar

Community saint

This is not working correctly for me, so I thought I'd rewrite the short guidance to see if I'm missing something (in either my setup or my entire interpretation of how this should work). The information is from a post by Chris here, particularly point #13. My rewrites and/or questions are in red bold:

13)

Short-URL support has now become much more advanced. You can now make it so you have a single ocPortal site that runs across different subdomains. You can also make it so that zones appear to be structured hierarchically. This is an advanced feature, and requires server administration access to work (i.e. it's unlikely to work on most shared webhosts).
The procedure is as follows:

a) It is strongly recommended, for simplicity and user-friendliness, that you operate ocPortal from the root of your domain name.For this example mydomain.com. This only works with Short-URL's enabled
b i) For multiple sub(domain) names, each representing a different zone…
Set up multiple website profiles in IIS manager (or the Apache configuration file, if you're using Apache). These profiles must all point to the ocPortal installation directory but not the zone subdirectory.
b ii) For complex hierarchies:
Set up virtual directories in IIS manage (or the Apache configuration file, if you're using Apache). These virtual directories must all point to the ocPortal installation directory but not the zone subdirectory.
c) ocPortal is now set up to receive requests on the various domain names / paths that you have configured. Extra stuff needs adding to the ocPortal info.php, to tell ocPortal how to map these individual source locations, into zone accesses.
Let's pretend we've added a new subdomain 'forum.mydomain.com' (for the forum zone), and a new virtual directory under our normal website entry, under 'example/path' (for the xyz zone). You would add this to info.php
$SITE_INFO['ZONE_MAPPING_forum']=array('forum.mydomain.com',
'');
$SITE_INFO['ZONE_MAPPING_xyz']=array('mydomain.com','example
/xyz');

d) Now ocPortal links point to the proper complex URLs, and the complex URLs are properly recognised as zones.

It's possible that my issues are stemming from not having my site at the domain root (not possible in my case)? My server is

Code

http://support.mydomain.com
and what I'd like to have is

Code

http://customername.mydomain.com
. I'm trying to provide a customized support experience for a customer, but using the data from my main support site. I'm kinda getting stopped dead as after I login at

Code

http://customername.mydomain.com
, I get a conflicting cookies popup error. Clicking OK or Cancel leaves me in my desired zone, however, all links are now back to

Code

http://support.mydomain.com
. If I substitute customername for support in the address bar, leaving the rest of the URL intact, I'm just returned to the login page and the process repeats. So, now I'm thinking I've misunderstood how this should function.

TIA!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#50263
Avatar

Hi,

Thanks for the instruction clarification. We'll actually incorporate that (it's in this tutorial: ocPortal Tutorial: Advanced configuration - ocPortal.com).

This little bit was "wrong":
$SITE_INFO['ZONE_MAPPING_xyz']=array('mydomain.com','example
/xyz');
I don't mean literally wrong, but leaving it as our:
$SITE_INFO['ZONE_MAPPING_xyz']=array('mydomain.com','example
/path');
would have been fine. The reason is this example is setting up a virtual path, which you can do (this isn't just for subdomains - it's for complex paths too). The subdomains and paths do not need to correspond to the name of the zone; the info.php line (above) sorts out the mapping.

Now, about your experience…

You probably have your cookies set wrong for this. Set the cookie domain to ".mydomain.com" then clear your cookies.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#50268
Avatar

Community saint

Hi Chris! Thanks and I'll give it a try. As an FYI: after re-reading my original post, I may have given the wrong impression. The points I made in red should be interpreted as questions/clarifications only, not corrections to the document. Sorry 'bout that.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: