Managing subdomains

10 views
Skip to first unread message

The Sage Colleges Webmaster

unread,
Feb 22, 2012, 1:38:58 PM2/22/12
to Reason Discussion
Hey guys,
We have Reason setup and running and have setup a lot of sites in the
www.sage.edu/site/ naming convention. We've been asked to come up with
subdomains for some of our schools (ie. http://management.sage.edu,
etc) - and when a user goes to that site be able to see the site we've
setup at www.sage.edu/management/ (not just a redirect, but be able to
navigate through without sending them off to www.sage.edu/school/).

Is there an easy way of doing this?

Mark F. Heiman

unread,
Feb 22, 2012, 2:32:51 PM2/22/12
to reason-d...@googlegroups.com
The Sage Colleges Webmaster,
(You really must sign your messages so we know how to address you :)

Does the content need to be visible both at www.sage.edu/management/ and management.sage.edu, or only at the latter? The solution is probably different depending on the answer to that.


Mark F. Heiman
Carleton College Web Services
mhe...@carleton.edu

> --
> You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
> To post to this group, send email to reason-d...@googlegroups.com.
> To unsubscribe from this group, send email to reason-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/reason-discussion?hl=en.
>

The Sage Colleges Webmaster

unread,
Feb 22, 2012, 3:21:40 PM2/22/12
to Reason Discussion
Hi Mark,
I believe it can be just the latter (only management.sage.edu) as we
are going to swap all schools to this url setup. However, if it is
easier to keep it visible at both, I don't think it would be bad to
maintain the sage.edu/management url.

- Kevin Hanselman
(sorry, so used to my email auto-adding my signature I never write my
name!)

On Feb 22, 2:32 pm, "Mark F. Heiman" <mhei...@carleton.edu> wrote:
> The Sage Colleges Webmaster,
> (You really must sign your messages so we know how to address you :)
>
> Does the content need to be visible both atwww.sage.edu/management/and management.sage.edu, or only at the latter? The solution is probably different depending on the answer to that.
>
> Mark F. Heiman
> Carleton College Web Services
> mhei...@carleton.edu
>
> On Feb 22, 2012, at 12:38 PM, The Sage Colleges Webmaster wrote:
>
>
>
>
>
>
>
> > Hey guys,
> > We have Reason setup and running and have setup a lot of sites in the
> >www.sage.edu/site/naming convention. We've been asked to come up with
> > subdomains for some of our schools (ie.http://management.sage.edu,
> > etc) - and when a user goes to that site be able to see the site we've
> > setup atwww.sage.edu/management/(not just a redirect, but be able to

Mark F. Heiman

unread,
Feb 24, 2012, 4:35:15 PM2/24/12
to reason-d...@googlegroups.com
Kevin,
There are (at least) two ways you could approach this.

Since some 4.0beta version of Reason, we have had VERY EXPERIMENTAL multiple domain support. If you populate the reason_package/settings/domain_settings.php config file (it has internal documentation) you can assign different sites in a single Reason instance to be served under different domains. You'll need to set up Apache virtual hosts for all the domains you want to respond to.

We are not using this feature in production at Carleton, but a couple of us are using it privately, using a single instance of Reason to host web sites for unrelated organizations. This feature is UNTESTED in an environment like you describe, and there are undoubtedly bugs. We'd be happy for you to try it and report problems, so long as you understand that it's an experimental guinea pig situation.


Another option would be to let Apache do the work for you. If you set up a rewrite rule like this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^management.sage.edu$
RewriteCond %{REQUEST_URI} !^/management/
RewriteRule ^(.*)$ /management/$1

addresses like sage.edu/management/faculty would be served up under management.sage.edu/faculty/. The biggest problem here is that since Reason will still think the pages are at sage.edu, any internal page links will bounce you back to the original location. I believe Apache could be set up to rewrite URLs in your content as it is served, but you're getting into scary territory there, which is why we started developing the multidomain support in Reason. I suppose you could put in another rewrite that would redirect links to the old server over to the new URL, so while the links in your content would always be to the old server, no one would see the old URLs in their browser.

If your departments just want to be able to publish links like management.sage.edu, and don't really care where people end up, that basic rewrite might be all you need.


Neither of those answers is perfect, but maybe that gives you some possibilities to think about.


Mark F. Heiman
Carleton College Web Services

mhe...@carleton.edu

The Sage Colleges Webmaster

unread,
Feb 27, 2012, 10:55:47 AM2/27/12
to Reason Discussion
Thanks Mark,
So, if I get the instructions correctly, I just put in the array a new
domain, pointing it at the server's web root folder, and then edit the
already existing site in Reason and choose the new domain in the drop
down list. This will then serve those pages at the new domain?

(Would love to hear from anyone that is currently doing this - either
EDU based or for personal use. Feel free to email off group at
webm...@sage.edu).

- Kevin

On Feb 24, 4:35 pm, "Mark F. Heiman" <mhei...@carleton.edu> wrote:
> Kevin,
> There are (at least) two ways you could approach this.
>
> Since some 4.0beta version of Reason, we have had VERY EXPERIMENTAL multiple domain support. If you populate the reason_package/settings/domain_settings.php config file (it has internal documentation) you can assign different sites in a single Reason instance to be served under different domains. You'll need to set up Apache virtual hosts for all the domains you want to respond to.
>
> We are not using this feature in production at Carleton, but a couple of us are using it privately, using a single instance of Reason to host web sites for unrelated organizations. This feature is UNTESTED in an environment like you describe, and there are undoubtedly bugs. We'd be happy for you to try it and report problems, so long as you understand that it's an experimental guinea pig situation.
>
> Another option would be to let Apache do the work for you.  If you set up a rewrite rule like this:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^management.sage.edu$
> RewriteCond %{REQUEST_URI} !^/management/
> RewriteRule ^(.*)$ /management/$1
>
> addresses like sage.edu/management/faculty would be served up under management.sage.edu/faculty/. The biggest problem here is that since Reason will still think the pages are at sage.edu, any internal page links will bounce you back to the original location.  I believe Apache could be set up to rewrite URLs in your content as it is served, but you're getting into scary territory there, which is why we started developing the multidomain support in Reason.  I suppose you could put in another rewrite that would redirect links to the old server over to the new URL, so while the links in your content would always be to the old server, no one would see the old URLs in their browser.
>
> If your departments just want to be able to publish links like management.sage.edu, and don't really care where people end up, that basic rewrite might be all you need.
>
> Neither of those answers is perfect, but maybe that gives you some possibilities to think about.
>
> Mark F. Heiman
> Carleton College Web Services
> mhei...@carleton.edu
>
> On Feb 22, 2012, at 2:21 PM, The Sage Colleges Webmaster wrote:
>
>
>
>
>
>
>
> > Hi Mark,
> > I believe it can be just the latter (only management.sage.edu) as we
> > are going to swap all schools to this url setup. However, if it is
> > easier to keep it visible at both, I don't think it would be bad to
> > maintain the sage.edu/management url.
>
> > - Kevin Hanselman
> > (sorry, so used to my email auto-adding my signature I never write my
> > name!)
>
> > On Feb 22, 2:32 pm, "Mark F. Heiman" <mhei...@carleton.edu> wrote:
> >> The Sage Colleges Webmaster,
> >> (You really must sign your messages so we know how to address you :)
>
> >> Does the content need to be visible both atwww.sage.edu/management/andmanagement.sage.edu, or only at the latter? The solution is probably different depending on the answer to that.
>
> >> Mark F. Heiman
> >> Carleton College Web Services
> >> mhei...@carleton.edu
>
> >> On Feb 22, 2012, at 12:38 PM, The Sage Colleges Webmaster wrote:
>
> >>> Hey guys,
> >>> We have Reason setup and running and have setup a lot of sites in the
> >>>www.sage.edu/site/namingconvention. We've been asked to come up with
> >>> subdomains for some of our schools (ie.http://management.sage.edu,
> >>> etc) - and when a user goes to that site be able to see the site we've
> >>> setup atwww.sage.edu/management/(notjust a redirect, but be able to

Nathan White

unread,
Feb 29, 2012, 4:55:11 PM2/29/12
to reason-d...@googlegroups.com
Hi Kevin - as Mark said all the multidomain stuff is totally experimental. I don't think the "domain" field option in the site content manager actually does anything. All the custom settings in domain_settings.php are loaded by looking at the domain used in your URL. So, I think if you edit a site for management.sage.edu when in the administrative interface at www.sage.edu/reason/, it will actually create rewrites in the web tree at www.sage.edu for the site, not wherever you have management.sage.edu mapped to in the file system. This could be bad.

I don't believe that the rewrites or the url history functions (auto 404) handling understand domains at all - these are the two places multidomain support probably needs to be implemented to make this more seamless. Also, the WYSIWYG editor doesn't understand how to make links to other domains.

As it stands - if you do modify domain_settings.php you should make sure to create and edit any sites you want served in the management.sage.edu domain by going to management.sage.edu/reason/ when editing / creating sites. If you make changes to a site in a custom domain while your URL shows a different domain, unexpected things will probably happen.

Nate
Reply all
Reply to author
Forward
0 new messages